[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 1 04:37:48 PDT 2018
lebedev.ri added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:282-290
+def warn_unused_using_declaration : Warning<
+ "unused using declaration %0">,
+ InGroup<UnusedUsing>, DefaultIgnore;
+def warn_unused_using_directive : Warning<
+ "unused using directive %0">,
+ InGroup<UnusedUsing>, DefaultIgnore;
+def warn_unused_using_alias : Warning<
----------------
JFYI you can condense it down to just
```
def warn_unused_using_declaration : Warning<
"unused %select{using declaration|using directive|namespace alias}0 %1">,
InGroup<UnusedUsing>, DefaultIgnore;
```
if that simplifies the code that actually emits that warning.
https://reviews.llvm.org/D44826
More information about the cfe-commits
mailing list