[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Tooling / clang-check-mac-libcxx-abspath.cpp
blob476ba3ce0849a497751dbda566e81755006e6942
1 // Clang on MacOS can find libc++ living beside the installed compiler.
2 // This test makes sure our libTooling-based tools emulate this properly.
3 //
4 // RUN: rm -rf %t
5 // RUN: mkdir %t
6 //
7 // Install the mock libc++ (simulates the libc++ directory structure).
8 // RUN: cp -r %S/Inputs/mock-libcxx %t/
9 //
10 // Pretend clang is installed beside the mock library that we provided.
11 // RUN: echo '[{"directory":"%t","command":"%t/mock-libcxx/bin/clang++ -stdlib=libc++ -target x86_64-apple-darwin -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json
12 // RUN: cp "%s" "%t/test.cpp"
13 // clang-check will produce an error code if the mock library is not found.
14 // RUN: clang-check -p "%t" "%t/test.cpp"
16 #include <mock_vector>
17 vector v;