aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/AST/SourceLocationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r--clang/unittests/AST/SourceLocationTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp
index 7d6e0c3..c1651bc 100644
--- a/clang/unittests/AST/SourceLocationTest.cpp
+++ b/clang/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