Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-tidy/modernize/UseAnonymousNamespaceCheck.cpp | ||
---|---|---|
31 | Please don't use auto unless type is explicitly spelled in same statement or iterator. |
I'm not entirely sure why this belongs in the modernize module given anonymous namespaces have been in c++ forever, maybe its more of a misc check? Also the modernize checks are meant to actually emit fixes(ignore the c arrays check :) ), Right now, this only warn, it doesn't appear to act
Don't have a strong opinion, if you want I can move it there! I put in modernize as in "modernize from C-style into C++ style". But I know there's diverse opinions about this (LLVM not following this, for example) so perhaps it should be misc. Let me know which one you'd prefer so I can apply the change!
I didn't add fix because it would add quite some complexity, e.g. figuring out if there's is already an anon namespace to move into, or create a new one, users might want configurable behavior, etc.
@njames93 Ping again. Alternatively, could someone else review? @aaron.ballman maybe?
Another week, another ping @njames93 @aaron.ballman
I have addressed all comments since 3 weeks ago, and have not received any objections. I intend to land this patch next week (1st December) if I don't receive any further feedback.
clang-tools-extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.rst | ||
---|---|---|
7–9 ↗ | (On Diff #478603) | Would we want this to be a fix as well? Removing the static keyword automatically would be nice. |
clang-tools-extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.rst | ||
---|---|---|
7–9 ↗ | (On Diff #478603) | 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. |
Looks good to me. All comments/suggestions/concerns addressed.
clang-tools-extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.rst | ||
---|---|---|
7–9 ↗ | (On Diff #478603) | Ack. |
Please don't use auto unless type is explicitly spelled in same statement or iterator.