OSDN Git Service

[NFC] Add missing 'override's
authorLogan Smith <logan.r.smith0@gmail.com>
Tue, 21 Jul 2020 02:52:36 +0000 (19:52 -0700)
committerLogan Smith <logan.r.smith0@gmail.com>
Tue, 21 Jul 2020 02:52:49 +0000 (19:52 -0700)
clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
clang/tools/clang-scan-deps/ClangScanDeps.cpp
llvm/include/llvm/Support/CrashRecoveryContext.h

index dabcd6a..b91bf79 100644 (file)
@@ -104,7 +104,7 @@ void MapExtDefNamesConsumer::addIfInMain(const DeclaratorDecl *DD,
 class MapExtDefNamesAction : public ASTFrontendAction {
 protected:
   std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
-                                                 llvm::StringRef) {
+                                                 llvm::StringRef) override {
     return std::make_unique<MapExtDefNamesConsumer>(CI.getASTContext());
   }
 };
index 91659e7..91d2dc2 100644 (file)
@@ -179,12 +179,12 @@ public:
   SingleCommandCompilationDatabase(tooling::CompileCommand Cmd)
       : Command(std::move(Cmd)) {}
 
-  virtual std::vector<tooling::CompileCommand>
-  getCompileCommands(StringRef FilePath) const {
+  std::vector<tooling::CompileCommand>
+  getCompileCommands(StringRef FilePath) const override {
     return {Command};
   }
 
-  virtual std::vector<tooling::CompileCommand> getAllCompileCommands() const {
+  std::vector<tooling::CompileCommand> getAllCompileCommands() const override {
     return {Command};
   }
 
index 61a1bd4..1529c19 100644 (file)
@@ -181,7 +181,7 @@ public:
       : CrashRecoveryContextCleanupBase<
             CrashRecoveryContextDestructorCleanup<T>, T>(context, resource) {}
 
-  virtual void recoverResources() {
+  void recoverResources() override {
     this->resource->~T();
   }
 };