[clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a DiagnosticBuilder
Going through a string removes some of the smarts of the diagnosic printer
and makes the code more complicated. This change has some cosmetic impact
on the output but that's mostly minor.
llvm-svn: 265680
diff --git a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp
index 42ce65b..dc411fc 100644
--- a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp
@@ -74,8 +74,8 @@
if (FI.Lines > LineThreshold || FI.Statements > StatementThreshold ||
FI.Branches > BranchThreshold) {
diag(P.first->getLocation(),
- "function '%0' exceeds recommended size/complexity thresholds")
- << P.first->getNameAsString();
+ "function %0 exceeds recommended size/complexity thresholds")
+ << P.first;
}
if (FI.Lines > LineThreshold) {