summaryrefslogtreecommitdiffstats
path: root/clang/test/ClangScanDeps/error.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2019-06-26 21:11:51 +0000
committerAlex Lorenz <arphaman@gmail.com>2019-06-26 21:11:51 +0000
commitd5f7196feb7da50564c5ad444f5fd3fecf08f340 (patch)
tree43e6c203d59ec62a657fba22caccce869ced99b6 /clang/test/ClangScanDeps/error.cpp
parentc0cad9836342a8aa6b0664412e769ae46bd49acd (diff)
downloadbcm5719-llvm-d5f7196feb7da50564c5ad444f5fd3fecf08f340.tar.gz
bcm5719-llvm-d5f7196feb7da50564c5ad444f5fd3fecf08f340.zip
[clang-scan-deps] Introduce the DependencyScanning library with the
thread worker code and better error handling This commit extracts out the code that will powers the fast scanning worker into a new file in a new DependencyScanning library. The error and output handling is improved so that the clients can gather errors/results from the worker directly. Differential Revision: https://reviews.llvm.org/D63681 llvm-svn: 364474
Diffstat (limited to 'clang/test/ClangScanDeps/error.cpp')
-rw-r--r--clang/test/ClangScanDeps/error.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/ClangScanDeps/error.cpp b/clang/test/ClangScanDeps/error.cpp
new file mode 100644
index 00000000000..9eca87bdd93
--- /dev/null
+++ b/clang/test/ClangScanDeps/error.cpp
@@ -0,0 +1,21 @@
+// RUN: rm -rf %t.dir
+// RUN: rm -rf %t.cdb
+// RUN: mkdir -p %t.dir
+// RUN: cp %s %t.dir/regular_cdb.cpp
+// RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb.json > %t.cdb
+//
+// RUN: not clang-scan-deps -compilation-database %t.cdb -j 1 2>%t.dir/errs
+// RUN: echo EOF >> %t.dir/errs
+// RUN: FileCheck %s --input-file %t.dir/errs
+
+#include "missing.h"
+
+// CHECK: Error while scanning dependencies
+// CHECK-NEXT: error: no such file or directory:
+// CHECK-NEXT: error: no input files
+// CHECK-NEXT: error:
+// CHECK-NEXT: Error while scanning dependencies
+// CHECK-NEXT: fatal error: 'missing.h' file not found
+// CHECK-NEXT: "missing.h"
+// CHECK-NEXT: ^
+// CHECK-NEXT: EOF
OpenPOWER on IntegriCloud