[PATCH] D137340: [clang-tidy] Add misc-use-anonymous-namespace check

Dave Brown via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 23:12:01 PST 2022


bigdavedev accepted this revision.
bigdavedev added a comment.
This revision is now accepted and ready to land.

Looks good to me. All comments/suggestions/concerns addressed.



================
Comment at: clang-tools-extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.rst:7-9
+that could instead be moved into an anonymous namespace. It also detects
+instances moved to an anonymous namespace that still keep the redundant
+``static``.
----------------
carlosgalvezp wrote:
> bigdavedev wrote:
> > Would we want this to be a fix as well? Removing the `static` keyword automatically would be nice.
> Would make sense to fix, but unfortunately with my limited AST knowledge I don't know how to get the location of the `static` token to apply a removal. So unless someone wants to help out with that it will have to stay as is for now.
Ack.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137340



More information about the cfe-commits mailing list