Details
- Reviewers
alexfh
Diff Detail
Event Timeline
Awesome! Thank you for tackling this! A few comments.
clang-tidy/misc/CMakeLists.txt | ||
---|---|---|
39 | Please fix file sorting around the new file. | |
clang-tidy/misc/MiscTidyModule.cpp | ||
123 | I think, all "misc-unused-" checks except for the "misc-unused-raii" (which finds actual bugs) mostly relate to readability. I suggest placing the new check to readability/ and we'll then move the other two "misc-unused-" checks there as well. | |
clang-tidy/misc/UnusedUsingDeclsCheck.cpp | ||
24 | Why is it necessarily a recordType? How about typedefs and enums? | |
clang-tidy/misc/UnusedUsingDeclsCheck.h | ||
33 | I'm not sure how the llvm/ADT/DenseMap.h header is pulled here, but DenseMap is not even used in ClangTidy.h, so this transitive inclusion is rather brittle. Please include llvm/ADT/DenseMap.h directly. | |
docs/clang-tidy/checks/misc-unused-using-decls.rst | ||
7 | Add an example, please. |
clang-tidy/misc/MiscTidyModule.cpp | ||
---|---|---|
123 | I am not really certain that "readability" is a reasonable category for unused things. Maybe unused should be its own category? At any rate, I think we should move all of them at the same time and not now go ahead and create a weird intermediate state. | |
clang-tidy/misc/UnusedUsingDeclsCheck.cpp | ||
24 | I'd like to handle those as a follow-up. We only track using declarations of Records at the moment in the callback, too. |
LG with one nit.
Thank you!
clang-tidy/misc/MiscTidyModule.cpp | ||
---|---|---|
123 | Fair enough. Let's go this way then. | |
clang-tidy/misc/UnusedUsingDeclsCheck.cpp | ||
67 | FoundDecls should be cleared at the end. There are some cases when a check can be used multiple times (e.g. in unit tests). Though we're not adding unit tests here, I think, we shouldn't hide this kind of a surprise in the code ;) |
Please fix file sorting around the new file.