diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-03-13 08:12:15 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-03-13 08:12:15 +0000 |
commit | 2e5c11ff5cade19387621f3583a0565748f380bf (patch) | |
tree | df9abc995a6c33d8baf240b73dc2f581f6a0eabd /clang/lib/ASTMatchers/ASTMatchFinder.cpp | |
parent | 27774d9274fb4037322397e7cd0e6976c5bf57ed (diff) | |
download | bcm5719-llvm-2e5c11ff5cade19387621f3583a0565748f380bf.tar.gz bcm5719-llvm-2e5c11ff5cade19387621f3583a0565748f380bf.zip |
[C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203769
Diffstat (limited to 'clang/lib/ASTMatchers/ASTMatchFinder.cpp')
-rw-r--r-- | clang/lib/ASTMatchers/ASTMatchFinder.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp index b2911a3be25..3e9d3d2a1cf 100644 --- a/clang/lib/ASTMatchers/ASTMatchFinder.cpp +++ b/clang/lib/ASTMatchers/ASTMatchFinder.cpp @@ -407,36 +407,36 @@ public: return Visitor.findMatch(Node); } - virtual bool classIsDerivedFrom(const CXXRecordDecl *Declaration, - const Matcher<NamedDecl> &Base, - BoundNodesTreeBuilder *Builder); + bool classIsDerivedFrom(const CXXRecordDecl *Declaration, + const Matcher<NamedDecl> &Base, + BoundNodesTreeBuilder *Builder) override; // Implements ASTMatchFinder::matchesChildOf. - virtual bool matchesChildOf(const ast_type_traits::DynTypedNode &Node, - const DynTypedMatcher &Matcher, - BoundNodesTreeBuilder *Builder, - TraversalKind Traversal, - BindKind Bind) { + bool matchesChildOf(const ast_type_traits::DynTypedNode &Node, + const DynTypedMatcher &Matcher, + BoundNodesTreeBuilder *Builder, + TraversalKind Traversal, + BindKind Bind) override { if (ResultCache.size() > MaxMemoizationEntries) ResultCache.clear(); return memoizedMatchesRecursively(Node, Matcher, Builder, 1, Traversal, Bind); } // Implements ASTMatchFinder::matchesDescendantOf. - virtual bool matchesDescendantOf(const ast_type_traits::DynTypedNode &Node, - const DynTypedMatcher &Matcher, - BoundNodesTreeBuilder *Builder, - BindKind Bind) { + bool matchesDescendantOf(const ast_type_traits::DynTypedNode &Node, + const DynTypedMatcher &Matcher, + BoundNodesTreeBuilder *Builder, + BindKind Bind) override { if (ResultCache.size() > MaxMemoizationEntries) ResultCache.clear(); return memoizedMatchesRecursively(Node, Matcher, Builder, INT_MAX, TK_AsIs, Bind); } // Implements ASTMatchFinder::matchesAncestorOf. - virtual bool matchesAncestorOf(const ast_type_traits::DynTypedNode &Node, - const DynTypedMatcher &Matcher, - BoundNodesTreeBuilder *Builder, - AncestorMatchMode MatchMode) { + bool matchesAncestorOf(const ast_type_traits::DynTypedNode &Node, + const DynTypedMatcher &Matcher, + BoundNodesTreeBuilder *Builder, + AncestorMatchMode MatchMode) override { // Reset the cache outside of the recursive call to make sure we // don't invalidate any iterators. if (ResultCache.size() > MaxMemoizationEntries) @@ -466,7 +466,7 @@ public: } // Implements ASTMatchFinder::getASTContext. - virtual ASTContext &getASTContext() const { return *ActiveASTContext; } + ASTContext &getASTContext() const override { return *ActiveASTContext; } bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return true; } @@ -573,7 +573,7 @@ private: : Context(Context), Callback(Callback) {} - virtual void visitMatch(const BoundNodes& BoundNodesView) { + void visitMatch(const BoundNodes& BoundNodesView) override { Callback->run(MatchFinder::MatchResult(BoundNodesView, Context)); } @@ -746,7 +746,7 @@ public: : Finder(Finder), ParsingDone(ParsingDone) {} private: - virtual void HandleTranslationUnit(ASTContext &Context) { + void HandleTranslationUnit(ASTContext &Context) override { if (ParsingDone != NULL) { ParsingDone->run(); } |