aboutsummaryrefslogtreecommitdiff
path: root/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/AST/SourceLocationTest.cpp')
-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 953cb9e42c..dec833d15d 100644
--- a/unittests/AST/SourceLocationTest.cpp
+++ b/unittests/AST/SourceLocationTest.cpp
@@ -258,6 +258,12 @@ TEST(CXXNewExpr, ArrayRange) {
EXPECT_TRUE(Verifier.match("void f() { new int[10]; }", newExpr()));
}
+TEST(CXXNewExpr, ParenRange) {
+ RangeVerifier<CXXNewExpr> Verifier;
+ Verifier.expectRange(1, 12, 1, 20);
+ EXPECT_TRUE(Verifier.match("void f() { new int(); }", newExpr()));
+}
+
TEST(MemberExpr, ImplicitMemberRange) {
RangeVerifier<MemberExpr> Verifier;
Verifier.expectRange(2, 30, 2, 30);