summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp b/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp
index ed6ff9198e0..093250d541f 100644
--- a/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp
@@ -82,7 +82,8 @@ void AvoidCStyleCastsCheck::check(const MatchFinder::MatchResult &Result) {
if (!Result.Context->getLangOpts().CPlusPlus)
return;
- // Leave type spelling exactly as it was.
+ // Leave type spelling exactly as it was (unlike
+ // getTypeAsWritten().getAsString() which would spell enum types 'enum X').
StringRef DestTypeString = Lexer::getSourceText(
CharSourceRange::getTokenRange(
CastExpr->getLParenLoc().getLocWithOffset(1),
OpenPOWER on IntegriCloud