diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp index e3e82d717d5..d20416e8086 100644 --- a/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp @@ -110,7 +110,8 @@ findDifferingParamsInDeclaration(const FunctionDecl *ParameterSourceDeclaration, SourceParamName != OtherParamName) { SourceRange OtherParamNameRange = DeclarationNameInfo((*OtherParamIt)->getDeclName(), - (*OtherParamIt)->getLocation()).getSourceRange(); + (*OtherParamIt)->getLocation()) + .getSourceRange(); bool GenerateFixItHint = checkIfFixItHintIsApplicable( ParameterSourceDeclaration, *SourceParamIt, OriginalDeclaration); @@ -202,13 +203,15 @@ std::string joinParameterNames( } void formatDifferingParamsDiagnostic( - InconsistentDeclarationParameterNameCheck *Check, - SourceLocation Location, StringRef OtherDeclarationDescription, + InconsistentDeclarationParameterNameCheck *Check, SourceLocation Location, + StringRef OtherDeclarationDescription, const DifferingParamsContainer &DifferingParams) { - auto ChooseOtherName = - [](const DifferingParamInfo &ParamInfo) { return ParamInfo.OtherName; }; - auto ChooseSourceName = - [](const DifferingParamInfo &ParamInfo) { return ParamInfo.SourceName; }; + auto ChooseOtherName = [](const DifferingParamInfo &ParamInfo) { + return ParamInfo.OtherName; + }; + auto ChooseSourceName = [](const DifferingParamInfo &ParamInfo) { + return ParamInfo.SourceName; + }; auto ParamDiag = Check->diag(Location, |