From 9b836fb019bb82970464f4e14b36a6e51dbdc7dd Mon Sep 17 00:00:00 2001 From: Abramo Bagnara Date: Thu, 8 Nov 2012 13:52:58 +0000 Subject: Fixed range of implicit MemberExpr. llvm-svn: 167581 --- clang/unittests/AST/SourceLocationTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/unittests/AST/SourceLocationTest.cpp') diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index 7d6e0c3dade..c1651bc586f 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 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 -- cgit v1.2.3