[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp marked an inline comment as done. carlosgalvezp added a comment. > The LLVM coding style says to prefer static over anonymous namespaces. Yes, but this is not an LLVM check, it's a `misc` check. Other project are allowed to have other guidelines. Repository: rG LLVM Github Mono

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479403. carlosgalvezp added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113/new/ https://reviews.llvm.org/D139113 Files: clang-tools-extra/clang-tidy/misc/UseAnonymousNamespace

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. The LLVM coding style says to prefer static over anonymous namespaces. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.rst:19 +* Functions or variables in header files, since anonymous namespaces in headers + is cons

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. I'm happy with my changes now, ready for a new round of review! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113/new/ https://reviews.llvm.org/D139113 ___ cfe-commit

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479397. carlosgalvezp added a comment. Remove accidentally added newline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113/new/ https://reviews.llvm.org/D139113 Files: clang-tools-extra/clang-tidy/

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479394. carlosgalvezp added a comment. Document ignored cases in the documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113/new/ https://reviews.llvm.org/D139113 Files: clang-tools-extra/c

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479391. carlosgalvezp marked an inline comment as done. carlosgalvezp added a comment. Add options for users to define their own header file extensions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
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(Matche

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479383. carlosgalvezp added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113/new/ https://reviews.llvm.org/D139113 Files: clang-tools-extra/clang-tidy/misc/UseAnonymousN

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Nathan James via Phabricator via cfe-commits
njames93 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;

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 479284. carlosgalvezp added a comment. Fix naming convention Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139113/new/ https://reviews.llvm.org/D139113 Files: clang-tools-extra/clang-tidy/misc/UseAnony

[PATCH] D139113: Fix a couple additional cases in misc-use-anonymous-namespace only

2022-12-01 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. Herald added a reviewer: njames93. Herald added a project: All. carlosgalvezp requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - Do not analyze header files, since we don't want to promote usi