llvm-capstone/clang/test/Frontend/rewrite-includes-macros.cpp
Nico Weber 960881a7f3 clang: Make rewrite-includes-macros.cpp runnable on non-Win
As far as I can tell, there's nothing Windows-specific about the
test and it passes fine on other platforms.

I found this test when running

    rg clang_cl clang/test | rg '%s' | rg -v -- ' -- ' | rg -v not

after 547ee1c81fceaabcb to see if other tests were missing `--`
before `%s` in `%clang_cl` invocations. This was the only one.
Since it used to run only on Windows, it wasn't needed, but as far
as I can tell there's no reason to run it only on Windows.

Differential Revision: https://reviews.llvm.org/D158279
2023-08-19 10:47:37 -04:00

16 lines
352 B
C++

// RUN: %clang_cl /E -Xclang -frewrite-includes -- %s | %clang_cl /c -Xclang -verify /Tp -
// expected-no-diagnostics
// This test uses dos-style \r\n line endings.
// Make sure your editor doesn't rewrite them to unix-style \n line endings.
int foo();
int bar();
#define HELLO \
foo(); \
bar();
int main() {
HELLO
return 0;
}