Author: David Stone Date: 2026-05-10T12:16:24-06:00 New Revision: dd23e411f75396a037f5442b3f6a78f0fa392ca4
URL: https://github.com/llvm/llvm-project/commit/dd23e411f75396a037f5442b3f6a78f0fa392ca4 DIFF: https://github.com/llvm/llvm-project/commit/dd23e411f75396a037f5442b3f6a78f0fa392ca4.diff LOG: [clang-tidy][NFC] Move `ClassifiedToken` to cpp file (#196820) `ClassifiedToken` is used in only the implementation of `UseTrailingReturnTypeCheck`. Move it into the unnamed namespace of the cpp file instead of it being in the header. Added: Modified: clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h Removed: ################################################################################ diff --git a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp index ea43cd6c42222..8bc06afaeb33c 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp @@ -205,6 +205,16 @@ static bool isSpecifier(Token T) { tok::kw_static, tok::kw_friend, tok::kw_virtual); } +namespace { + +struct ClassifiedToken { + Token T; + bool IsQualifier; + bool IsSpecifier; +}; + +} // namespace + static std::optional<ClassifiedToken> classifyToken(const FunctionDecl &F, Preprocessor &PP, Token Tok) { ClassifiedToken CT; diff --git a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h index 4aa1adaf30db5..05a8952f03700 100644 --- a/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h +++ b/clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h @@ -14,12 +14,6 @@ namespace clang::tidy::modernize { -struct ClassifiedToken { - Token T; - bool IsQualifier; - bool IsSpecifier; -}; - /// Rewrites function signatures to use a trailing return type. /// /// For the user-facing documentation see: _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
