[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / preprocess.cpp
blobd855fed62d481ee2ad3f8bdb9e7336ab169a5f7c
1 // RUN: rm -rf %t
2 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x c++ -E %s | \
3 // RUN: FileCheck -strict-whitespace %s
4 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c -E %s | \
5 // RUN: FileCheck -strict-whitespace %s
6 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x c++ -E -frewrite-includes %s | \
7 // RUN: FileCheck -strict-whitespace %s --check-prefix=REWRITE
8 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs -x objective-c -E -frewrite-includes %s | \
9 // RUN: FileCheck -strict-whitespace %s --check-prefix=REWRITE
10 #include "dummy.h"
11 #include "dummy.h"
12 foo bar baz
14 // EOF marker to ensure -frewrite-includes doesn't match its own CHECK lines.
16 // REWRITE: #if 0
17 // REWRITE: #include{{ }}"dummy.h"
18 // REWRITE: #endif
20 // CHECK: #pragma clang module import dummy /* clang {{.*}} implicit import
22 // REWRITE: #if 0
23 // REWRITE: #include{{ }}"dummy.h"
24 // REWRITE: #endif
26 // CHECK: #pragma clang module import dummy /* clang {{.*}} implicit import
28 // CHECK: foo bar baz
30 // REWRITE: // {{EOF}} marker