diff options
| author | Samuel Benzaquen <sbenza@google.com> | 2015-03-06 16:24:47 +0000 |
|---|---|---|
| committer | Samuel Benzaquen <sbenza@google.com> | 2015-03-06 16:24:47 +0000 |
| commit | bb5093fefdf6c3944e17e5ce2951be5bb5cb49aa (patch) | |
| tree | e75a6661bb4102d2079e74cfa4659c86e3bd387b /clang/unittests/ASTMatchers/ASTMatchersTest.cpp | |
| parent | 298a3a05673384d761e0f925f826b1f0646e190a (diff) | |
| download | bcm5719-llvm-bb5093fefdf6c3944e17e5ce2951be5bb5cb49aa.tar.gz bcm5719-llvm-bb5093fefdf6c3944e17e5ce2951be5bb5cb49aa.zip | |
Fix isOverride() for the case of a dependent typed base class.
The method decl is not marked as overriding any other method decls
until the template is instantiated.
Use the override attribute as another signal.
llvm-svn: 231487
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.cpp')
| -rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersTest.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp index 0d27b5db034..dab22e33cda 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTest.cpp +++ b/clang/unittests/ASTMatchers/ASTMatchersTest.cpp @@ -1790,6 +1790,9 @@ TEST(Matcher, MatchesOverridingMethod) { methodDecl(isOverride()))); EXPECT_TRUE(notMatches("class X { int f(); int f(int); }; ", methodDecl(isOverride()))); + EXPECT_TRUE( + matches("template <typename Base> struct Y : Base { void f() override;};", + methodDecl(isOverride(), hasName("::Y::f")))); } TEST(Matcher, ConstructorCall) { |

