xref: /llvm-project/clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp (revision 0a29028072fd6c86f25d3892b3b97dc24bed8be4)
1f2e25e70SSam McCall // Clang on MacOS can find libc++ living beside the installed compiler.
2f2e25e70SSam McCall // This test makes sure our libTooling-based tools emulate this properly with
3f2e25e70SSam McCall // fixed compilation database.
4f2e25e70SSam McCall //
5f2e25e70SSam McCall // RUN: rm -rf %t
6f2e25e70SSam McCall // RUN: mkdir %t
7f2e25e70SSam McCall //
8f2e25e70SSam McCall // Install the mock libc++ (simulates the libc++ directory structure).
9f2e25e70SSam McCall // RUN: cp -r %S/Inputs/mock-libcxx %t/
10f2e25e70SSam McCall //
117382066bSReid Kleckner // RUN: cp clang-check %t/mock-libcxx/bin/
127382066bSReid Kleckner // RUN: cp %s %t/test.cpp
134d540382SMichal Gorny // RUN: "%t/mock-libcxx/bin/clang-check" -p %t %t/test.cpp -- \
144d540382SMichal Gorny // RUN:     -stdlib=libc++ -target x86_64-apple-darwin \
154d540382SMichal Gorny // RUN:     -ccc-install-dir %t/mock-libcxx/bin
164d540382SMichal Gorny //
174d540382SMichal Gorny // ^ -ccc-install-dir passed to unbreak tests on *BSD where
184d540382SMichal Gorny //   getMainExecutable() relies on real argv[0] being passed
19*0a290280SDon Hinton //
20*0a290280SDon Hinton // UNSUPPORTED: enable_shared
21f2e25e70SSam McCall #include <mock_vector>
22f2e25e70SSam McCall vector v;
23