14 lines · cpp
1// REQUIRES: symlinks2 3// RUN: rm -rf %t4// RUN: mkdir -p %t/abc/def/ijk/qwe5// 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.json6// RUN: cp "%s" "%t/abc/def/ijk/qwe/test.cpp"7// RUN: ln -sf %t/abc/def %t/abc/def28// RUN: cd %t/abc/def29// RUN: env PWD="%t/abc/def" not clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s10 11// CHECK: a type specifier is required12// CHECK: /abc/def/ijk/qwe/test.cpp13invalid;14