projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
721567a
)
Test for source location range of new expressions fixed in r167507.
author
David Blaikie
<dblaikie@gmail.com>
Wed, 7 Nov 2012 17:17:07 +0000
(17:17 +0000)
committer
David Blaikie
<dblaikie@gmail.com>
Wed, 7 Nov 2012 17:17:07 +0000
(17:17 +0000)
Patch by Philip Craig.
llvm-svn: 167538
clang/unittests/AST/SourceLocationTest.cpp
patch
|
blob
|
history
diff --git
a/clang/unittests/AST/SourceLocationTest.cpp
b/clang/unittests/AST/SourceLocationTest.cpp
index
73415b5
..
7d6e0c3
100644
(file)
--- 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