carlosgalvezp marked 2 inline comments as done.
carlosgalvezp added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/misc/UseAnonymousNamespaceCheck.cpp:44
+  const SourceManager &SM = MatchedDecl->getASTContext().getSourceManager();
+  if (!SM.isWrittenInMainFile(MatchedDecl->getLocation()))
+    return;
----------------
njames93 wrote:
> The logic would fall apart when run in clangd or unity builds. The safest way 
> is generally to match the file extension, we have a class for it in 
> `clang-tidy/utils`
Great suggestion, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139113

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

Reply via email to