ASTMatchersTests/matchesConditionallyWithCuda: Add -fno-ms-extensions, and get rid...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 5 Aug 2014 15:54:43 +0000 (15:54 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 5 Aug 2014 15:54:43 +0000 (15:54 +0000)
I am not sure whether -xcuda might imply -fno-ms-extensions.

llvm-svn: 214876

clang/unittests/ASTMatchers/ASTMatchersTest.h

index 8919cea..ce5c8d7 100644 (file)
@@ -136,7 +136,10 @@ testing::AssertionResult matchesConditionallyWithCuda(
   std::unique_ptr<FrontendActionFactory> Factory(
       newFrontendActionFactory(&Finder));
   // Some tests use typeof, which is a gnu extension.
-  std::vector<std::string> Args({"-xcuda", CompileArg});
+  std::vector<std::string> Args;
+  Args.push_back("-xcuda");
+  Args.push_back("-fno-ms-extensions");
+  Args.push_back(CompileArg);
   if (!runToolOnCodeWithArgs(Factory->create(),
                              CudaHeader + Code, Args)) {
     return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";