diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-04-11 02:00:23 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-04-11 02:00:23 +0000 |
commit | dfa4cf312655e1a82a39b0ef94e2a4db731aedad (patch) | |
tree | 380384533a5cedc86ff5bf81b7cc334777369102 /unittests/Tooling/TestVisitor.h | |
parent | 7d191b2364ab007773cdb792dbd64d1f92158618 (diff) | |
download | clang-dfa4cf312655e1a82a39b0ef94e2a4db731aedad.tar.gz |
Use 'override/final' instead of 'virtual' for overridden methods
Summary:
The patch is generated using clang-tidy misc-use-override check.
This command was used:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
-checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix
Reviewers: dblaikie
Reviewed By: dblaikie
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D8926
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling/TestVisitor.h')
-rw-r--r-- | unittests/Tooling/TestVisitor.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unittests/Tooling/TestVisitor.h b/unittests/Tooling/TestVisitor.h index d4416950f2..f4a0039448 100644 --- a/unittests/Tooling/TestVisitor.h +++ b/unittests/Tooling/TestVisitor.h @@ -82,7 +82,7 @@ protected: public: FindConsumer(TestVisitor *Visitor) : Visitor(Visitor) {} - virtual void HandleTranslationUnit(clang::ASTContext &Context) { + void HandleTranslationUnit(clang::ASTContext &Context) override { Visitor->Context = &Context; Visitor->TraverseDecl(Context.getTranslationUnitDecl()); } @@ -95,8 +95,8 @@ protected: public: TestAction(TestVisitor *Visitor) : Visitor(Visitor) {} - virtual std::unique_ptr<clang::ASTConsumer> - CreateASTConsumer(CompilerInstance &, llvm::StringRef dummy) { + std::unique_ptr<clang::ASTConsumer> + CreateASTConsumer(CompilerInstance &, llvm::StringRef dummy) override { /// TestConsumer will be deleted by the framework calling us. return llvm::make_unique<FindConsumer>(Visitor); } @@ -133,7 +133,7 @@ public: } /// \brief Checks that all expected matches have been found. - virtual ~ExpectedLocationVisitor() { + ~ExpectedLocationVisitor() override { for (typename std::vector<ExpectedMatch>::const_iterator It = ExpectedMatches.begin(), End = ExpectedMatches.end(); It != End; ++It) { |