diff options
Diffstat (limited to 'unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | unittests/AST/SourceLocationTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp index 73415b5b3d..7d6e0c3dad 100644 --- a/unittests/AST/SourceLocationTest.cpp +++ b/unittests/AST/SourceLocationTest.cpp @@ -248,5 +248,11 @@ TEST(ParmVarDecl, KNRRange) { EXPECT_TRUE(Verifier.match("void f(i) {}", varDecl(), Lang_C)); } +TEST(CXXNewExpr, ArrayRange) { + RangeVerifier<CXXNewExpr> Verifier; + Verifier.expectRange(1, 12, 1, 22); + EXPECT_TRUE(Verifier.match("void f() { new int[10]; }", newExpr())); +} + } // end namespace ast_matchers } // end namespace clang |