]> granicus.if.org Git - clang/commitdiff
ToolingTests/runToolOnCode.TestSkipFunctionBody: Appease msc targets.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 17 Jun 2016 02:04:51 +0000 (02:04 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 17 Jun 2016 02:04:51 +0000 (02:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272985 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Tooling/ToolingTest.cpp

index c0b8695e34410d1283383bc3ab7639efeba03230..10ac0c33ed85d5bd111f86d226c43d45ea54b0b3 100644 (file)
@@ -256,6 +256,7 @@ struct SkipBodyAction : public clang::ASTFrontendAction {
 
 TEST(runToolOnCode, TestSkipFunctionBody) {
   std::vector<std::string> Args = {"-std=c++11"};
+  std::vector<std::string> Args2 = {"-fno-delayed-template-parsing"};
 
   EXPECT_TRUE(runToolOnCode(new SkipBodyAction,
                             "int skipMe() { an_error_here }"));
@@ -310,9 +311,9 @@ TEST(runToolOnCode, TestSkipFunctionBody) {
   EXPECT_TRUE(runToolOnCode(
       new SkipBodyAction, "template<typename T> int skipMe() { an_error_here }"
                           "int x = skipMe<int>();"));
-  EXPECT_FALSE(
-      runToolOnCode(new SkipBodyAction,
-                    "template<typename T> int skipMeNot() { an_error_here }"));
+  EXPECT_FALSE(runToolOnCodeWithArgs(
+      new SkipBodyAction,
+      "template<typename T> int skipMeNot() { an_error_here }", Args2));
 }
 
 TEST(runToolOnCodeWithArgs, TestNoDepFile) {