[clang-tools-extra] [clang-tidy] Refactor how NamedDecl are renamed (PR #88735)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 07:09:11 PDT 2024


================
@@ -61,6 +61,44 @@ struct DenseMapInfo<clang::tidy::RenamerClangTidyCheck::NamingCheckId> {
 namespace clang::tidy {
 
 namespace {
+/// Returns the function that \p Method is overridding. If There are none or
+/// multiple overrides it returns nullptr. If the overridden function itself is
+/// overridding then it will recurse up to find the first decl of the function.
+const CXXMethodDecl *getOverrideMethod(const CXXMethodDecl *Method) {
----------------
PiotrZSL wrote:

anyonymous namespace -> static (per llvm codding guidelines)
leave only NameLookup in anonymous namespace

https://github.com/llvm/llvm-project/pull/88735


More information about the cfe-commits mailing list