[cfe-commits] r167538 - /cfe/trunk/unittests/AST/SourceLocationTest.cpp
David Blaikie
dblaikie at gmail.com
Wed Nov 7 09:17:07 PST 2012
Author: dblaikie
Date: Wed Nov 7 11:17:07 2012
New Revision: 167538
URL: http://llvm.org/viewvc/llvm-project?rev=167538&view=rev
Log:
Test for source location range of new expressions fixed in r167507.
Patch by Philip Craig.
Modified:
cfe/trunk/unittests/AST/SourceLocationTest.cpp
Modified: cfe/trunk/unittests/AST/SourceLocationTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/SourceLocationTest.cpp?rev=167538&r1=167537&r2=167538&view=diff
==============================================================================
--- cfe/trunk/unittests/AST/SourceLocationTest.cpp (original)
+++ cfe/trunk/unittests/AST/SourceLocationTest.cpp Wed Nov 7 11:17:07 2012
@@ -248,5 +248,11 @@
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
More information about the cfe-commits
mailing list