diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-04-21 10:18:18 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-04-21 10:18:18 +0000 |
commit | 1aa3f7b4ed0c7830cc937131bf99fa3f3ca14c10 (patch) | |
tree | f0503966b244a94d6edb44a77b2595a743d2bc72 /test/Tooling | |
parent | 2163377a729317c7c4f07fa9be6c248d752d97d0 (diff) | |
download | clang-1aa3f7b4ed0c7830cc937131bf99fa3f3ca14c10.tar.gz |
[Tooling] Inject -resource-dir instead of overwriting argv[0].
This allows using a different standard library (the one from argv[0] in
the compilation database) with the correct builtins.
Differential Revision: http://reviews.llvm.org/D19356
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Tooling')
-rw-r--r-- | test/Tooling/clang-check-builtin-headers.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Tooling/clang-check-builtin-headers.cpp b/test/Tooling/clang-check-builtin-headers.cpp index 76fc9c4b3d..c48e2f2a9d 100644 --- a/test/Tooling/clang-check-builtin-headers.cpp +++ b/test/Tooling/clang-check-builtin-headers.cpp @@ -4,9 +4,11 @@ // RUN: echo '[{"directory":".","command":"/random/tool -c %t/test.cpp","file":"%t/test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json // RUN: cp "%s" "%t/test.cpp" // RUN: not clang-check -p "%t" "%t/test.cpp" 2>&1|FileCheck %s +// RUN: not clang-check -p "%t" "%t/test.cpp" -extra-arg=-resource-dir=foo 2>&1|FileCheck %s -check-prefix=CHECK-NOHDR // FIXME: Make the above easier. #include <stddef.h> // CHECK: C++ requires +// CHECK-NOHDR: fatal error: 'stddef.h' file not invalid; |