[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Tooling / fixed-database.cpp
blob038ef5c470e21be4406aac94580ee07c0fb48539
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t/Src
3 // RUN: cp "%s" "%t/Src/test.cpp"
4 // RUN: mkdir -p %t/Include
5 // RUN: cp "%S/Inputs/fixed-header.h" "%t/Include/"
6 // -I flag is relative to %t (where compile_flags is), not Src/.
7 // RUN: echo '-IInclude/' >> %t/compile_flags.txt
8 // RUN: echo " -Dklazz=class " >> %t/compile_flags.txt
9 // RUN: echo '-std=c++11' >> %t/compile_flags.txt
10 // RUN: clang-check "%t/Src/test.cpp" 2>&1
11 // RUN: echo > %t/compile_flags.txt
12 // RUN: not clang-check "%t/Src/test.cpp" 2>&1 | FileCheck "%s" -check-prefix=NODB
14 // NODB: unknown type name 'klazz'
15 klazz F{};
17 // NODB: 'fixed-header.h' file not found
18 #include "fixed-header.h"
19 static_assert(SECRET_SYMBOL == 1, "");