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 | 34eb20725d9d923f6f2ff9f205f198d5f3df022b (patch) | |
tree | 4edc0a751e1e64c8fd953053d1a230ac09e16eae /clang/unittests/Tooling/CommentHandlerTest.cpp | |
parent | af7d76c7204c0a586fd38fff45ffe0bd284593b0 (diff) | |
download | bcm5719-llvm-34eb20725d9d923f6f2ff9f205f198d5f3df022b.tar.gz bcm5719-llvm-34eb20725d9d923f6f2ff9f205f198d5f3df022b.zip |
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
llvm-svn: 234678
Diffstat (limited to 'clang/unittests/Tooling/CommentHandlerTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/CommentHandlerTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/unittests/Tooling/CommentHandlerTest.cpp b/clang/unittests/Tooling/CommentHandlerTest.cpp index 117dfc36feb..da5604524cd 100644 --- a/clang/unittests/Tooling/CommentHandlerTest.cpp +++ b/clang/unittests/Tooling/CommentHandlerTest.cpp @@ -30,11 +30,11 @@ class CommentHandlerVisitor : public TestVisitor<CommentHandlerVisitor>, public: CommentHandlerVisitor() : base(), PP(nullptr), Verified(false) {} - ~CommentHandlerVisitor() { + ~CommentHandlerVisitor() override { EXPECT_TRUE(Verified) << "CommentVerifier not accessed"; } - virtual bool HandleComment(Preprocessor &PP, SourceRange Loc) { + bool HandleComment(Preprocessor &PP, SourceRange Loc) override { assert(&PP == this->PP && "Preprocessor changed!"); SourceLocation Start = Loc.getBegin(); @@ -56,7 +56,7 @@ public: CommentVerifier GetVerifier(); protected: - virtual ASTFrontendAction* CreateTestAction() { + ASTFrontendAction *CreateTestAction() override { return new CommentHandlerAction(this); } @@ -70,8 +70,8 @@ private: CommentHandlerAction(CommentHandlerVisitor *Visitor) : TestAction(Visitor) { } - virtual bool BeginSourceFileAction(CompilerInstance &CI, - StringRef FileName) { + bool BeginSourceFileAction(CompilerInstance &CI, + StringRef FileName) override { CommentHandlerVisitor *V = static_cast<CommentHandlerVisitor*>(this->Visitor); V->PP = &CI.getPreprocessor(); @@ -79,7 +79,7 @@ private: return true; } - virtual void EndSourceFileAction() { + void EndSourceFileAction() override { CommentHandlerVisitor *V = static_cast<CommentHandlerVisitor*>(this->Visitor); V->PP->removeCommentHandler(V); |