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