Detect template specializations that should be handled specially.
In some cases it is allowed to extend the std namespace with
template specializations.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.cpp | ||
---|---|---|
29 | Might as well give this a better name so it's less similar to List. | |
92 | This one is missing the system header check, but I wonder if that can be handled once in the call to addMatcher() instead of needing to be sprinkled here? | |
138 | You should add the newline back. |
LGTM with some minor nits.
clang-tools-extra/clang-tidy/cert/DontModifyStdNamespaceCheck.cpp | ||
---|---|---|
80–81 | This one can go as well, right? | |
clang-tools-extra/test/clang-tidy/checkers/cert/dcl58-cpp.cpp | ||
209 | Can you add a comment above this to mention that an alias declaration is the same as a typedef, and does not introduce a user-defined type, which is why the below fails. | |
254 | Same mention here about an alias declaration not being a user-defined type. |
This appears to be causing a crash with friend declarations. The crash happens during matching, see https://github.com/llvm/llvm-project/issues/56902
Might as well give this a better name so it's less similar to List.