From 2dcbdc0606b5eeec43bf13c79f0116979b37c1f7 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 17 Jun 2013 22:35:10 +0000 Subject: Fix source range of CXXNewExpr with parentheses around the type. PR15569. llvm-svn: 184139 --- clang/unittests/AST/SourceLocationTest.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/unittests/AST/SourceLocationTest.cpp') diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index 990e6dfc85a..669fcd48a47 100644 --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/unittests/AST/SourceLocationTest.cpp @@ -174,5 +174,11 @@ TEST(TemplateSpecializationTypeLoc, AngleBracketLocations) { loc(templateSpecializationType()))); } +TEST(CXXNewExpr, TypeParenRange) { + RangeVerifier Verifier; + Verifier.expectRange(1, 10, 1, 18); + EXPECT_TRUE(Verifier.match("int* a = new (int);", newExpr())); +} + } // end namespace ast_matchers } // end namespace clang -- cgit v1.2.3