diff options
author | Abramo Bagnara <abramo.bagnara@bugseng.com> | 2012-11-08 13:52:58 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@bugseng.com> | 2012-11-08 13:52:58 +0000 |
commit | 9b836fb019bb82970464f4e14b36a6e51dbdc7dd (patch) | |
tree | 061235c16af98d9a77f8b5f55672b539d6d0d024 /clang/unittests/AST/SourceLocationTest.cpp | |
parent | 26216e4ae31a4f64a232355600bb35f065074360 (diff) | |
download | llvm-9b836fb019bb82970464f4e14b36a6e51dbdc7dd.zip llvm-9b836fb019bb82970464f4e14b36a6e51dbdc7dd.tar.gz llvm-9b836fb019bb82970464f4e14b36a6e51dbdc7dd.tar.bz2 |
Fixed range of implicit MemberExpr.
llvm-svn: 167581
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 8 |
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 |