@@ -113,7 +113,7 @@ struct UnqualNameVisitor : public RecursiveASTVisitor<UnqualNameVisitor> {
113113};
114114} // namespace
115115
116- constexpr llvm::StringLiteral MessageFunction =
116+ constexpr llvm::StringLiteral ErrorMessageOnFunction =
117117 " use a trailing return type for this function" ;
118118
119119static SourceLocation expandIfMacroId (SourceLocation Loc,
@@ -422,7 +422,7 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
422422 if (F->getDeclaredReturnType ()->isFunctionPointerType () ||
423423 F->getDeclaredReturnType ()->isMemberFunctionPointerType () ||
424424 F->getDeclaredReturnType ()->isMemberPointerType ()) {
425- diag (F->getLocation (), MessageFunction );
425+ diag (F->getLocation (), ErrorMessageOnFunction );
426426 return ;
427427 }
428428
@@ -439,14 +439,14 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
439439 // FIXME: This may happen if we have __attribute__((...)) on the function.
440440 // We abort for now. Remove this when the function type location gets
441441 // available in clang.
442- diag (F->getLocation (), MessageFunction );
442+ diag (F->getLocation (), ErrorMessageOnFunction );
443443 return ;
444444 }
445445
446446 SourceLocation InsertionLoc =
447447 findTrailingReturnTypeSourceLocation (*F, FTL, Ctx, SM, LangOpts);
448448 if (InsertionLoc.isInvalid ()) {
449- diag (F->getLocation (), MessageFunction );
449+ diag (F->getLocation (), ErrorMessageOnFunction );
450450 return ;
451451 }
452452
@@ -456,7 +456,7 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
456456 SourceRange ReturnTypeCVRange = findReturnTypeAndCVSourceRange (
457457 *F, FTL.getReturnLoc (), Ctx, SM, LangOpts, PP);
458458 if (ReturnTypeCVRange.isInvalid ()) {
459- diag (F->getLocation (), MessageFunction );
459+ diag (F->getLocation (), ErrorMessageOnFunction );
460460 return ;
461461 }
462462
@@ -471,7 +471,7 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
471471 UnqualNameVisitor UNV{*F};
472472 UNV.TraverseTypeLoc (FTL.getReturnLoc ());
473473 if (UNV.Collision ) {
474- diag (F->getLocation (), MessageFunction );
474+ diag (F->getLocation (), ErrorMessageOnFunction );
475475 return ;
476476 }
477477
@@ -490,7 +490,7 @@ void UseTrailingReturnTypeCheck::check(const MatchFinder::MatchResult &Result) {
490490 keepSpecifiers (ReturnType, Auto, ReturnTypeCVRange, *F, Fr, Ctx, SM, LangOpts,
491491 PP);
492492
493- diag (F->getLocation (), MessageFunction )
493+ diag (F->getLocation (), ErrorMessageOnFunction )
494494 << FixItHint::CreateReplacement (ReturnTypeCVRange, Auto)
495495 << FixItHint::CreateInsertion (InsertionLoc, " -> " + ReturnType);
496496}
0 commit comments