[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Tooling / auto-detect-from-source-parent-of-cwd.cpp
blob762c89e9e52aa3eae90923d9c33ddef77c18f173
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t/abc/def/ijk/qwe
3 // RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/abc/def/ijk/qwe/test.cpp\",\"file\":\"%t/abc/def/ijk/qwe/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
4 // RUN: cp "%s" "%t/abc/def/ijk/qwe/test.cpp"
5 // RUN: ln -sf %t/abc/def %t/abc/def2
6 // RUN: cd %t/abc/def2
7 // RUN: env PWD="%t/abc/def" not clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
9 // CHECK: a type specifier is required
10 // CHECK: /abc/def/ijk/qwe/test.cpp
11 invalid;
13 // REQUIRES: shell