[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

Carlos Alberto Enciso via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 1 04:32:09 PDT 2018


CarlosAlbertoEnciso added inline comments.


================
Comment at: docs/ReleaseNotes.rst:139
+  used in conjunction with ``-Werror`` and as a result, the new warnings
+  are turned into new errors.
+
----------------
thakis wrote:
> nit: I'd omit this paragraph -- this is true for all warnings and not special for this warning.
Removed that specific paragraph.


================
Comment at: include/clang/Basic/DiagnosticGroups.td:828-829
                 // -Wunused-local-typedefs = -Wunused-local-typedef
+def : DiagGroup<"unused-usings", [UnusedUsing]>;
+                // -Wunused-usings = -Wunused-using
 
----------------
thakis wrote:
> CarlosAlbertoEnciso wrote:
> > lebedev.ri wrote:
> > > Why? gcc compatibility?
> > No particular reason. I just follow the 'unused-local-typedefs' model.
> > If there is not objection from others reviewers, I will drop the gcc compatibility.
> Does gcc have a `-Wunused-usings`? As far as I can tell it doesn't, so I agree not having the alias makes sense. -Wunused-local-typedefs is here because gcc has that flag.
As far as I can see, GCC does not have the ``-Wunused-usings`` alias.


https://reviews.llvm.org/D44826





More information about the cfe-commits mailing list