Fix source range of CXXNewExpr with parentheses around the type.  PR15569.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184139 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp
index 990e6df..669fcd4 100644
--- a/unittests/AST/SourceLocationTest.cpp
+++ b/unittests/AST/SourceLocationTest.cpp
@@ -174,5 +174,11 @@
       loc(templateSpecializationType())));
 }
 
+TEST(CXXNewExpr, TypeParenRange) {
+  RangeVerifier<CXXNewExpr> Verifier;
+  Verifier.expectRange(1, 10, 1, 18);
+  EXPECT_TRUE(Verifier.match("int* a = new (int);", newExpr()));
+}
+
 } // end namespace ast_matchers
 } // end namespace clang