[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 05:26:15 PDT 2016
djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.
Looks good.
================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:39
@@ +38,3 @@
+ // Ignores using-declarations defined in class definition.
+ if (isa<CXXRecordDecl>(TargetDecl->getDeclContext()))
+ return;
----------------
Ack. I think this is actually ok for now.
================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:66
@@ -59,4 +65,3 @@
Used = Specialization->getSpecializedTemplate();
- auto I = FoundDecls.find(Used->getCanonicalDecl());
- if (I != FoundDecls.end())
- I->second = nullptr;
+ removeFromFoundDecls(Used->getCanonicalDecl());
+ return;
----------------
Maybe the ->getCanonicalDecl() should be moved into removeFromFoundDecls?
http://reviews.llvm.org/D20018
More information about the cfe-commits
mailing list