[PATCH] D20018: Support variables and functions types in misc-unused-using-decls.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 05:13:09 PDT 2016
hokein 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;
----------------
djasper wrote:
> We should also ignore using declarations in function context (Koenig lookup..).
If we ignore them in function context, we will also skip the following case:
```
namespace a {
class A {};
};
void func() {
using a::A; // unused-using decls.
}
```
http://reviews.llvm.org/D20018
More information about the cfe-commits
mailing list