diff options
author | Enea Zaffanella <zaffanella@cs.unipr.it> | 2013-07-17 17:28:56 +0000 |
---|---|---|
committer | Enea Zaffanella <zaffanella@cs.unipr.it> | 2013-07-17 17:28:56 +0000 |
commit | c70b2519d5a9d1e612674bd78cb70ec350b101d1 (patch) | |
tree | 4cd0aa38e596025a11b2b8016e9d598f1a7b77cd /clang/unittests/AST/SourceLocationTest.cpp | |
parent | 5f6c173e7cb4f6a74c1aec2af3ae478a995c140d (diff) | |
download | bcm5719-llvm-c70b2519d5a9d1e612674bd78cb70ec350b101d1.tar.gz bcm5719-llvm-c70b2519d5a9d1e612674bd78cb70ec350b101d1.zip |
Fixed source range of C++03 access declarations.
llvm-svn: 186522
Diffstat (limited to 'clang/unittests/AST/SourceLocationTest.cpp')
-rw-r--r-- | clang/unittests/AST/SourceLocationTest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/unittests/AST/SourceLocationTest.cpp b/clang/unittests/AST/SourceLocationTest.cpp index 95ef2c425b5..49ecfd3c981 100644 --- a/clang/unittests/AST/SourceLocationTest.cpp +++ b/clang/unittests/AST/SourceLocationTest.cpp @@ -224,5 +224,25 @@ TEST(CXXUnresolvedConstructExpr, SourceRange) { unresolvedConstructExpr(), Args, Lang_CXX11)); } +TEST(UsingDecl, SourceRange) { + RangeVerifier<UsingDecl> Verifier; + Verifier.expectRange(2, 22, 2, 25); + EXPECT_TRUE(Verifier.match( + "class B { protected: int i; };\n" + "class D : public B { B::i; };", + usingDecl())); +} + +TEST(UnresolvedUsingValueDecl, SourceRange) { + RangeVerifier<UnresolvedUsingValueDecl> Verifier; + Verifier.expectRange(3, 3, 3, 6); + EXPECT_TRUE(Verifier.match( + "template <typename B>\n" + "class D : public B {\n" + " B::i;\n" + "};", + unresolvedUsingValueDecl())); +} + } // end namespace ast_matchers } // end namespace clang |