aganea created this revision. aganea added reviewers: abhina.sreeskantharajan, rnk, amccarth, MaskRay, mstorsjo. aganea requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Validate that we properly generating a single line ending on Windows when using `-frewrite-includes`. Otherwise we're breaking split-line macros. The test fails before D99837 <https://reviews.llvm.org/D99837>. See discussion in https://reviews.llvm.org/D96363#2650460 and D99426 <https://reviews.llvm.org/D99426> Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D99973 Files: clang/test/Frontend/rewrite-includes-macros.cpp Index: clang/test/Frontend/rewrite-includes-macros.cpp =================================================================== --- /dev/null +++ clang/test/Frontend/rewrite-includes-macros.cpp @@ -0,0 +1,14 @@ +// REQUIRES: system-windows +// RUN: %clang_cl /E -Xclang -frewrite-includes %s | %clang_cl /c -Xclang -verify /Tp - +// expected-no-diagnostics + +int foo(); +int bar(); +#define HELLO \ + foo(); \ + bar(); + +int main() { + HELLO + return 0; +} \ No newline at end of file
Index: clang/test/Frontend/rewrite-includes-macros.cpp =================================================================== --- /dev/null +++ clang/test/Frontend/rewrite-includes-macros.cpp @@ -0,0 +1,14 @@ +// REQUIRES: system-windows +// RUN: %clang_cl /E -Xclang -frewrite-includes %s | %clang_cl /c -Xclang -verify /Tp - +// expected-no-diagnostics + +int foo(); +int bar(); +#define HELLO \ + foo(); \ + bar(); + +int main() { + HELLO + return 0; +} \ No newline at end of file
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits