1*885c5593SDmitri Gribenko // Clang on MacOS can find libc++ living beside the installed compiler. 2*885c5593SDmitri Gribenko // This test makes sure clang-tidy emulates this properly. 3*885c5593SDmitri Gribenko // 4*885c5593SDmitri Gribenko // RUN: rm -rf %t 5*885c5593SDmitri Gribenko // RUN: mkdir %t 6*885c5593SDmitri Gribenko // 7*885c5593SDmitri Gribenko // Install the mock libc++ (simulates the libc++ directory structure). 8*885c5593SDmitri Gribenko // RUN: cp -r %S/Inputs/mock-libcxx %t/ 9*885c5593SDmitri Gribenko // 10*885c5593SDmitri Gribenko // Pretend clang is installed beside the mock library that we provided. 11*885c5593SDmitri Gribenko // RUN: echo '[{"directory":"%t","command":"%t/mock-libcxx/bin/clang++ -stdlib=libc++ -std=c++11 -target x86_64-apple-darwin -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json 12*885c5593SDmitri Gribenko // RUN: cp "%s" "%t/test.cpp" 13*885c5593SDmitri Gribenko // RUN: clang-tidy -header-filter='.*' -system-headers -checks='-*,modernize-use-using' "%t/test.cpp" | FileCheck %s 14*885c5593SDmitri Gribenko // CHECK: mock_vector:{{[0-9]+}}:{{[0-9]+}}: warning: use 'using' instead of 'typedef' 15*885c5593SDmitri Gribenko 16*885c5593SDmitri Gribenko #include <mock_vector> 17*885c5593SDmitri Gribenko typedef vector* vec_ptr; 18