diff options
author | Manuel Klimek <klimek@google.com> | 2012-07-10 13:10:51 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2012-07-10 13:10:51 +0000 |
commit | 8fa2fb859a4cb8e67d9763225281d9b0aa9cb59f (patch) | |
tree | baba2e136725c1e8cba0ce410db39759981af927 /test/Tooling/auto-detect-from-source.cpp | |
parent | 3f6d513d51a382371669f4d0b943fa830fffeef2 (diff) |
Adds support for auto-detection of compilation databases
from a source file and changes clang-check to make use of this.
This makes clang-check just work on in-tree builds, and allows
easy setup via a symlink per source directory to make clang-check
work without any extra configuration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Tooling/auto-detect-from-source.cpp')
-rw-r--r-- | test/Tooling/auto-detect-from-source.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Tooling/auto-detect-from-source.cpp b/test/Tooling/auto-detect-from-source.cpp new file mode 100644 index 0000000000..40a2a1c9fe --- /dev/null +++ b/test/Tooling/auto-detect-from-source.cpp @@ -0,0 +1,8 @@ +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json +// RUN: cp "%s" "%t/test.cpp" +// RUN: clang-check "%t/test.cpp" 2>&1 | FileCheck %s + +// CHECK: C++ requires +invalid; |