File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,12 @@ void MethodHidingCheck::check(const MatchFinder::MatchResult &Result) {
118118 if (!ShadowingMethod || !DerivedClass || !BaseMethod)
119119 llvm_unreachable (" Required binding not found" );
120120
121- diag (ShadowingMethod->getBeginLoc (),
122- " ' " + ShadowingMethod->getQualifiedNameAsString () +
123- " ' hides same method in ' " +
124- BaseMethod->getParent ()-> getNameAsString () + " ' " );
125- diag (BaseMethod-> getBeginLoc (), " previous definition is here " ,
126- DiagnosticIDs::Note );
121+ diag (ShadowingMethod->getBeginLoc (), " '%0' hides same method in '%1' " )
122+ << ShadowingMethod->getQualifiedNameAsString ()
123+ << BaseMethod-> getParent ()-> getNameAsString ();
124+ diag ( BaseMethod->getBeginLoc (), " previous definition of '%0' is here " ,
125+ DiagnosticIDs::Note)
126+ << ShadowingMethod-> getNameAsString ( );
127127}
128128
129129} // namespace clang::tidy::bugprone
You can’t perform that action at this time.
0 commit comments