aboutsummaryrefslogtreecommitdiff
path: root/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@bugseng.com>2012-11-08 13:52:58 +0000
committerAbramo Bagnara <abramo.bagnara@bugseng.com>2012-11-08 13:52:58 +0000
commit13fd684ee2c7578177b7c741e8eeec91ae628fcf (patch)
treec85a551cb11d90319d91431d4823d329107dae53 /unittests/AST/SourceLocationTest.cpp
parentef7bceadf4b43c953855013577afac4c2fcb1d62 (diff)
Fixed range of implicit MemberExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/AST/SourceLocationTest.cpp')
-rw-r--r--unittests/AST/SourceLocationTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/AST/SourceLocationTest.cpp b/unittests/AST/SourceLocationTest.cpp
index 7d6e0c3dad..c1651bc586 100644
--- a/unittests/AST/SourceLocationTest.cpp
+++ b/unittests/AST/SourceLocationTest.cpp
@@ -254,5 +254,13 @@ TEST(CXXNewExpr, ArrayRange) {
EXPECT_TRUE(Verifier.match("void f() { new int[10]; }", newExpr()));
}
+TEST(MemberExpr, ImplicitMemberRange) {
+ RangeVerifier<MemberExpr> Verifier;
+ Verifier.expectRange(2, 30, 2, 30);
+ EXPECT_TRUE(Verifier.match("struct S { operator int() const; };\n"
+ "int foo(const S& s) { return s; }",
+ memberExpr()));
+}
+
} // end namespace ast_matchers
} // end namespace clang