summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-11-07 17:17:07 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-11-07 17:17:07 +0000
commitb9db60fbce070a0eef80de620ac59b2a1b8869ec (patch)
tree68bd9b86261728c8a1c571eaf301e35b05221394 /clang/unittests/AST/SourceLocationTest.cpp
parent721567af3ec2a0f453f3cd9380a36a9ded7158f5 (diff)
downloadbcm5719-llvm-b9db60fbce070a0eef80de620ac59b2a1b8869ec.tar.gz
bcm5719-llvm-b9db60fbce070a0eef80de620ac59b2a1b8869ec.zip
Test for source location range of new expressions fixed in r167507.
Patch by Philip Craig. llvm-svn: 167538
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r--clang/unittests/AST/SourceLocationTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp
index 73415b5b3d1..7d6e0c3dade 100644
--- a/clang/unittests/AST/SourceLocationTest.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud