15 lines · cpp
1// REQUIRES: symlinks2 3// RUN: rm -rf %t4// RUN: mkdir %t5// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json6// RUN: cp "%s" "%t/test.cpp"7// RUN: ln -sf %t %t.foobar8// RUN: cd %t9// RUN: env PWD="%t.foobar" not clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s10// FIXME: Make the above easier.11 12// CHECK: a type specifier is required13// CHECK: .foobar/test.cpp14invalid;15