15 lines · cpp
1// Verifies that paths are resolved relatively to the directory specified in the2// compilation database.3// RUN: rm -rf %t4// RUN: mkdir %t5// RUN: echo "[{\"directory\":\"%t\",\"command\":\"clang -c test.cpp -I.\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\//g' > %t/compile_commands.json6// RUN: cp "%s" "%t/test.cpp"7// RUN: touch "%t/clang-check-test.h"8// RUN: not clang-check -p "%t" "%t/test.cpp" 2>&1|FileCheck %s9// FIXME: Make the above easier.10 11#include "clang-check-test.h"12 13// CHECK: a type specifier is required14invalid;15