summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-27 07:59:56 +0000
committerStephan Bergmann <sbergman@redhat.com>2017-06-27 07:59:56 +0000
commit83e6a8263610e9b47f3ef8896b412d65912600b0 (patch)
tree427eafb2ff3172670e68c07bd7c592ebead0a818
parent3a90dcff41db1bad8f9656c914fe3a51d6f4143a (diff)
downloadbcm5719-llvm-83e6a8263610e9b47f3ef8896b412d65912600b0.tar.gz
bcm5719-llvm-83e6a8263610e9b47f3ef8896b412d65912600b0.zip
Switch TestVisitor to Lang_C via -x c
...instead of -std=c99, as the latter lead to error: invalid argument '-std=c99' not allowed with 'C++' complaints in test logs Differential Revision: https://reviews.llvm.org/D34417 llvm-svn: 306373
-rw-r--r--clang/unittests/Tooling/TestVisitor.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/unittests/Tooling/TestVisitor.h b/clang/unittests/Tooling/TestVisitor.h
index a762ec8b145..adfd3ef60f5 100644
--- a/clang/unittests/Tooling/TestVisitor.h
+++ b/clang/unittests/Tooling/TestVisitor.h
@@ -53,7 +53,10 @@ public:
bool runOver(StringRef Code, Language L = Lang_CXX) {
std::vector<std::string> Args;
switch (L) {
- case Lang_C: Args.push_back("-std=c99"); break;
+ case Lang_C:
+ Args.push_back("-x");
+ Args.push_back("c");
+ break;
case Lang_CXX98: Args.push_back("-std=c++98"); break;
case Lang_CXX11: Args.push_back("-std=c++11"); break;
case Lang_CXX14: Args.push_back("-std=c++14"); break;
OpenPOWER on IntegriCloud