Commit 2c2a297b authored by Logan Smith's avatar Logan Smith
Browse files

[clang][NFC] Add 'override' keyword to virtual function overrides

This patch adds override to several overriding virtual functions that were missing the keyword within the clang/ directory. These were found by the new -Wsuggest-override.
parent e1ca7a65
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ private:
  /// the declare reduction construct is declared inside compound statement.
  LazyDeclPtr PrevDeclInScope;

  virtual void anchor();
  void anchor() override;

  OMPDeclareReductionDecl(Kind DK, DeclContext *DC, SourceLocation L,
                          DeclarationName Name, QualType Ty,
@@ -228,7 +228,7 @@ class OMPDeclareMapperDecl final : public ValueDecl, public DeclContext {

  LazyDeclPtr PrevDeclInScope;

  virtual void anchor();
  void anchor() override;

  OMPDeclareMapperDecl(Kind DK, DeclContext *DC, SourceLocation L,
                       DeclarationName Name, QualType Ty,
+4 −4
Original line number Diff line number Diff line
@@ -45,16 +45,16 @@ public:
  void popArgs();

  /// Describes the frame with arguments for diagnostic purposes.
  void describe(llvm::raw_ostream &OS);
  void describe(llvm::raw_ostream &OS) override;

  /// Returns the parent frame object.
  Frame *getCaller() const;
  Frame *getCaller() const override;

  /// Returns the location of the call to the frame.
  SourceLocation getCallLocation() const;
  SourceLocation getCallLocation() const override;

  /// Returns the caller.
  const FunctionDecl *getCallee() const;
  const FunctionDecl *getCallee() const override;

  /// Returns the current function.
  Function *getFunction() const { return Func; }
+3 −3
Original line number Diff line number Diff line
@@ -55,9 +55,9 @@ public:
    ArgsData.reserve(Args.size());
  }

  virtual bool HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS,
  bool HandlePrintfSpecifier(const analyze_printf::PrintfSpecifier &FS,
                             const char *StartSpecifier,
                                     unsigned SpecifierLen) {
                             unsigned SpecifierLen) override {
    if (!FS.consumesDataArgument() &&
        FS.getConversionSpecifier().getKind() !=
            clang::analyze_format_string::ConversionSpecifier::PrintErrno)
+1 −1
Original line number Diff line number Diff line
@@ -821,7 +821,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyOSTargetInfo
    : public OSTargetInfo<Target> {
protected:
  void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
                    MacroBuilder &Builder) const {
                    MacroBuilder &Builder) const override {
    // A common platform macro.
    if (Opts.POSIXThreads)
      Builder.defineMacro("_REENTRANT");
+1 −1
Original line number Diff line number Diff line
@@ -1066,7 +1066,7 @@ static IsTupleLike isTupleLike(Sema &S, SourceLocation Loc, QualType T,
    TemplateArgumentListInfo &Args;
    ICEDiagnoser(LookupResult &R, TemplateArgumentListInfo &Args)
        : R(R), Args(Args) {}
    void diagnoseNotICE(Sema &S, SourceLocation Loc, SourceRange SR) {
    void diagnoseNotICE(Sema &S, SourceLocation Loc, SourceRange SR) override {
      S.Diag(Loc, diag::err_decomp_decl_std_tuple_size_not_constant)
          << printTemplateArgs(S.Context.getPrintingPolicy(), Args);
    }
Loading