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 /examples | |
parent | 7d191b2364ab007773cdb792dbd64d1f92158618 (diff) |
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 'examples')
-rw-r--r-- | examples/PrintFunctionNames/PrintFunctionNames.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/PrintFunctionNames/PrintFunctionNames.cpp b/examples/PrintFunctionNames/PrintFunctionNames.cpp index b554caeb2a..39443f597f 100644 --- a/examples/PrintFunctionNames/PrintFunctionNames.cpp +++ b/examples/PrintFunctionNames/PrintFunctionNames.cpp @@ -23,7 +23,7 @@ namespace { class PrintFunctionsConsumer : public ASTConsumer { public: - virtual bool HandleTopLevelDecl(DeclGroupRef DG) { + bool HandleTopLevelDecl(DeclGroupRef DG) override { for (DeclGroupRef::iterator i = DG.begin(), e = DG.end(); i != e; ++i) { const Decl *D = *i; if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) @@ -37,12 +37,12 @@ public: class PrintFunctionNamesAction : public PluginASTAction { protected: std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, - llvm::StringRef) { + llvm::StringRef) override { return llvm::make_unique<PrintFunctionsConsumer>(); } bool ParseArgs(const CompilerInstance &CI, - const std::vector<std::string>& args) { + const std::vector<std::string> &args) override { for (unsigned i = 0, e = args.size(); i != e; ++i) { llvm::errs() << "PrintFunctionNames arg = " << args[i] << "\n"; |