[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Tooling / auto-detect-from-source.cpp
blobe6241a9ec3e56158cb2af28f2e570645b561fce1
1 // RUN: rm -rf %t
2 // RUN: mkdir %t
3 // RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -DSECRET=XYZZY -c %/t/test.cpp\",\"file\":\"%/t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
4 // RUN: cp "%s" "%t/test.cpp"
5 // RUN: not clang-check "%t/test.cpp" 2>&1 | FileCheck %s
7 // CHECK: XYZZY
8 SECRET;
10 // Copy to a different file, and rely on the command being inferred.
11 // RUN: cp "%s" "%t/other.cpp"
12 // RUN: not clang-check "%t/other.cpp" 2>&1 | FileCheck %s