summaryrefslogtreecommitdiffstats
path: root/clang/test/Tooling/auto-detect-from-source.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2012-07-10 13:10:51 +0000
committerManuel Klimek <klimek@google.com>2012-07-10 13:10:51 +0000
commit65fd0e1fd3c7fe24bb09e654d228c9584c2fa6ff (patch)
treec6a6969bd885beb99cae9776826065fdfda3f8bb /clang/test/Tooling/auto-detect-from-source.cpp
parent1dc44dcedd0bc93e267bcc5357fc2925942ca20e (diff)
downloadbcm5719-llvm-65fd0e1fd3c7fe24bb09e654d228c9584c2fa6ff.tar.gz
bcm5719-llvm-65fd0e1fd3c7fe24bb09e654d228c9584c2fa6ff.zip
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. llvm-svn: 159990
Diffstat (limited to 'clang/test/Tooling/auto-detect-from-source.cpp')
-rw-r--r--clang/test/Tooling/auto-detect-from-source.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Tooling/auto-detect-from-source.cpp b/clang/test/Tooling/auto-detect-from-source.cpp
new file mode 100644
index 00000000000..40a2a1c9fe3
--- /dev/null
+++ b/clang/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;
OpenPOWER on IntegriCloud