alexfh added inline comments.
================ Comment at: clang-tidy/readability/RedundantExternCheck.cpp:38-40 + Message = "'extern' keyword has no effect"; + } else { + Message = "redundant 'extern' keyword"; ---------------- These messages alone will be quite confusing unless the user has enough context. Please expand the messages with the explanations. ================ Comment at: clang-tidy/readability/RedundantExternCheck.cpp:48-50 + StringRef Text = + Lexer::getSourceText(CharSourceRange::getTokenRange(BeginLoc, EndLoc), + *Result.SourceManager, getLangOpts()); ---------------- I suspect there are many ways the `extern` substring can appear in a function definition (`void my_extern()`, `[[some_attribute("extern")]] void f()`, `void /*extern*/ f()`, etc.). I don't immediately see how these possible false positives are handled here. Am I missing something obvious? Is it more robust to re-lex the range and search for the raw identifier token with the text `extern`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D33841/new/ https://reviews.llvm.org/D33841 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits