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 | c2fc67e0cf7dd061fda1aa90d81668f3e070d4cb (patch) | |
tree | e73833b3195f9738b36fcc5c0f04a056659cf421 /unittests/AST/SourceLocationTest.cpp | |
parent | 45a37da030be06bb7babf5e65a64d62cd0def7e6 (diff) |
Fix a source range regression in C++ new expressions with call initializers.
Introduced in r167507, discovered in review by Abramo Bagnara.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167597 91177308-0d34-0410-b5e6-96231b3b80d8
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 953cb9e42c..dec833d15d 100644 --- a/unittests/AST/SourceLocationTest.cpp +++ b/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); |