Use an explicit instantiation to work around delayed template parsing for MSVC-built...
authorAaron Ballman <aaron@aaronballman.com>
Wed, 9 Mar 2016 18:07:17 +0000 (18:07 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 9 Mar 2016 18:07:17 +0000 (18:07 +0000)
llvm-svn: 263041

clang/unittests/ASTMatchers/ASTMatchersTest.cpp

index 63d0805..63dc1a8 100644 (file)
@@ -2590,9 +2590,9 @@ TEST(Matcher, Initializers) {
 
 TEST(Matcher, ParenListExpr) {
   EXPECT_TRUE(
-        matches(
-          "  template<typename T> class foo { void bar() { foo X(*this); } }; ",
-          varDecl(hasInitializer(parenListExpr(has(unaryOperator()))))));
+      matches("template<typename T> class foo { void bar() { foo X(*this); } };"
+              "template class foo<int>;",
+              varDecl(hasInitializer(parenListExpr(has(unaryOperator()))))));
 }
 
 TEST(Matcher, StmtExpr) {