[PATCH] D20018: Support variables and functions types in misc-unused-using-decls.
Daniel Jasper via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 03:03:14 PDT 2016
djasper added inline comments.
================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:39
@@ +38,3 @@
+ // Ignores using-declrations defined in class definition.
+ if (isa<CXXRecordDecl>(TargetDecl->getDeclContext()))
+ return;
----------------
We should also ignore using declarations in function context (Koenig lookup..).
================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.h:33
@@ -32,2 +32,3 @@
private:
+ void removeFromFoundDecls(const Decl *D);
llvm::DenseMap<const Decl*, const UsingDecl*> FoundDecls;
----------------
nit: Add an empty line after this.
================
Comment at: test/clang-tidy/misc-unused-using-decls.cpp:27
@@ +26,3 @@
+ public:
+ using Base::f;
+};
----------------
Move this into the "Using declarations" section.
http://reviews.llvm.org/D20018
More information about the cfe-commits
mailing list