diff options
Diffstat (limited to 'test/Modules/preprocess.cpp')
-rw-r--r-- | test/Modules/preprocess.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/test/Modules/preprocess.cpp b/test/Modules/preprocess.cpp index 0615331c8bd79..d855fed62d481 100644 --- a/test/Modules/preprocess.cpp +++ b/test/Modules/preprocess.cpp @@ -1,24 +1,30 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x c++ -E %s | \ -// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=CXX --check-prefix=CXX-DASHE +// RUN: FileCheck -strict-whitespace %s // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c -E %s | \ -// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=OBJC +// RUN: FileCheck -strict-whitespace %s // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x c++ -E -frewrite-includes %s | \ -// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=CXX +// RUN: FileCheck -strict-whitespace %s --check-prefix=REWRITE // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c -E -frewrite-includes %s | \ -// RUN: FileCheck -strict-whitespace %s --check-prefix=CHECK --check-prefix=OBJC +// RUN: FileCheck -strict-whitespace %s --check-prefix=REWRITE #include "dummy.h" #include "dummy.h" foo bar baz -// The weird {{ }} here is to prevent the -frewrite-includes test from matching its own CHECK lines. +// EOF marker to ensure -frewrite-includes doesn't match its own CHECK lines. -// CXX: #include{{ }}"dummy.h" -// CXX-DASHE-SAME: /* clang -E: implicit import for module dummy */ -// CXX: #include{{ }}"dummy.h" -// CXX-DASHE-SAME: /* clang -E: implicit import for module dummy */ -// CXX: foo bar baz +// REWRITE: #if 0 +// REWRITE: #include{{ }}"dummy.h" +// REWRITE: #endif -// OBJC: @import{{ }}dummy; /* clang -// OBJC: @import{{ }}dummy; /* clang -// OBJC: foo bar baz +// CHECK: #pragma clang module import dummy /* clang {{.*}} implicit import + +// REWRITE: #if 0 +// REWRITE: #include{{ }}"dummy.h" +// REWRITE: #endif + +// CHECK: #pragma clang module import dummy /* clang {{.*}} implicit import + +// CHECK: foo bar baz + +// REWRITE: // {{EOF}} marker |