================ @@ -32,6 +32,12 @@ class UnnecessaryCopyInitialization : public ClangTidyCheck { void check(const ast_matchers::MatchFinder::MatchResult &Result) override; void storeOptions(ClangTidyOptions::OptionMap &Opts) override; +protected: + // This is virtual so that derived classes can implement additional behavior. + virtual void makeDiagnostic(DiagnosticBuilder Diagnostic, const VarDecl &Var, ---------------- PiotrZSL wrote:
You may consider adding some test, even if it would only derive from this class, create instance of it, and override this method. Simply to make compilation fail when someone change this method. https://github.com/llvm/llvm-project/pull/73921 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits