diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-11-08 22:53:48 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-11-08 22:53:48 +0000 |
commit | 3a0de21233f49a15aca7ebeeba5cbc4feb482493 (patch) | |
tree | b19d0f8cd4a133f254d5e3074bf67b8b17f0fe19 /clang/unittests/AST/SourceLocationTest.cpp | |
parent | 641bd89d6b5e7378fdcc989e09ee1fcf6edf9f70 (diff) | |
download | bcm5719-llvm-3a0de21233f49a15aca7ebeeba5cbc4feb482493.tar.gz bcm5719-llvm-3a0de21233f49a15aca7ebeeba5cbc4feb482493.zip |
Fix a source range regression in C++ new expressions with call initializers.
Introduced in r167507, discovered in review by Abramo Bagnara.
llvm-svn: 167597
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index 953cb9e42ca..dec833d15d8 100644 --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/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); |