2012-05-07 17:17:48 +08:00
|
|
|
// Verifies that paths are resolved relatively to the directory specified in the
|
|
|
|
// compilation database.
|
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: mkdir %t
|
2012-05-24 06:24:27 +08:00
|
|
|
// RUN: echo "[{\"directory\":\"%t\",\"command\":\"clang -c test.cpp -I.\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\//g' > %t/compile_commands.json
|
2012-05-07 17:17:48 +08:00
|
|
|
// RUN: cp "%s" "%t/test.cpp"
|
|
|
|
// RUN: touch "%t/clang-check-test.h"
|
2013-07-05 00:16:58 +08:00
|
|
|
// RUN: not clang-check -p "%t" "%t/test.cpp" 2>&1|FileCheck %s
|
2012-05-07 17:17:48 +08:00
|
|
|
// FIXME: Make the above easier.
|
|
|
|
|
|
|
|
#include "clang-check-test.h"
|
|
|
|
|
|
|
|
// CHECK: C++ requires
|
|
|
|
invalid;
|