LegalizeAdulthood added inline comments.

================
Comment at: clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp:90
+  // to the `ASTContext`.
+  Finder->addMatcher(ast_matchers::translationUnitDecl().bind("TU"), this);
+}
----------------
In modernize-macro-to-enum I had to similarly discard macros defined inside a 
top-level decl.  I did `decl(hasParent(translationUnitDecl()))` to match the 
top-level decls.  Would that simplify your check as well?


================
Comment at: 
clang-tools-extra/clang-tidy/modernize/DeprecatedHeadersCheck.cpp:123
 
-IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(ClangTidyCheck &Check,
-                                                         LangOptions LangOpts)
+detail::IncludeModernizePPCallbacks::IncludeModernizePPCallbacks(
+    DeprecatedHeadersCheck &Check, LangOptions LangOpts)
----------------
IMO it's poor style to define entities that are declared within a namespace 
outside the namespace within which they were declared.

Is there some reason this isn't defined with the rest of the methods on the 
callback class?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125209/new/

https://reviews.llvm.org/D125209

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to