xref: /aosp_15_r20/external/clang/test/Tooling/clang-check-rel-path.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // This block test a compilation database with files relative to the directory
2*67e74705SXin Li // RUN: rm -rf %t
3*67e74705SXin Li // RUN: mkdir %t
4*67e74705SXin Li // RUN: echo '[{"directory":"%t","command":"clang++ -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json
5*67e74705SXin Li // RUN: cp "%s" "%t/test.cpp"
6*67e74705SXin Li // RUN: not clang-check -p "%t" "%t/test.cpp" 2>&1|FileCheck %s
7*67e74705SXin Li // FIXME: Make the above easier.
8*67e74705SXin Li 
9*67e74705SXin Li // CHECK: C++ requires
10*67e74705SXin Li invalid;
11