r306373 - Switch TestVisitor to Lang_C via -x c
Stephan Bergmann via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 27 00:59:56 PDT 2017
Author: sberg
Date: Tue Jun 27 00:59:56 2017
New Revision: 306373
URL: http://llvm.org/viewvc/llvm-project?rev=306373&view=rev
Log:
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
Modified:
cfe/trunk/unittests/Tooling/TestVisitor.h
Modified: cfe/trunk/unittests/Tooling/TestVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/TestVisitor.h?rev=306373&r1=306372&r2=306373&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/TestVisitor.h (original)
+++ cfe/trunk/unittests/Tooling/TestVisitor.h Tue Jun 27 00:59:56 2017
@@ -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;
More information about the cfe-commits
mailing list