summaryrefslogtreecommitdiff
path: root/unittests/AST
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-06-17 22:35:10 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-06-17 22:35:10 +0000
commit6e40c9544a0215c3e632e1fb79d5161adc464101 (patch)
tree5fe595695bbe2e9679c35fb8beaa62f4746a486e /unittests/AST
parent93cc515d3b99dca18d287d200e19355a2e9c02b2 (diff)
downloadclang-6e40c9544a0215c3e632e1fb79d5161adc464101.tar.gz
clang-6e40c9544a0215c3e632e1fb79d5161adc464101.tar.bz2
clang-6e40c9544a0215c3e632e1fb79d5161adc464101.tar.xz
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
Diffstat (limited to 'unittests/AST')
-rw-r--r--unittests/AST/SourceLocationTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp
index 990e6dfc85..669fcd48a4 100644
--- a/unittests/AST/SourceLocationTest.cpp
+++ b/unittests/AST/SourceLocationTest.cpp
@@ -174,5 +174,11 @@ TEST(TemplateSpecializationTypeLoc, AngleBracketLocations) {
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