Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-20 Thread Haojian Wu via cfe-commits
hokein added inline comments. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:59 @@ -59,1 +58,3 @@ /*SkipTrailingWhitespaceAndNewLine=*/true)); +for (const auto It : Using->shadows()) { + const auto *TargetDecl = It->getTargetDecl()->getCanonicalDecl();

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-20 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:59 @@ -59,1 +58,3 @@ /*SkipTrailingWhitespaceAndNewLine=*/true)); +for (const auto It : Using->shadows()) { + const auto *TargetDecl = It->getTargetDecl()->getCanonicalDecl();

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-20 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rL270191: [clang-tidy] Handle using-decls with more than one shadow decl. (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D20429?vs=57904&id

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-20 Thread Haojian Wu via cfe-commits
hokein marked 2 inline comments as done. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:59 @@ -59,1 +58,3 @@ /*SkipTrailingWhitespaceAndNewLine=*/true)); +for (const auto It : Using->shadows()) { + const auto *TargetDecl = It->getTargetDecl()->getCanon

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-20 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 57904. hokein added a comment. Address more comments. http://reviews.llvm.org/D20429 Files: clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tidy/misc/UnusedUsingDeclsCheck.h test/clang-tidy/misc-unused-using-decls.cpp Index: test/clang-tidy/misc-unuse

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-19 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with a couple of nits. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:22 @@ +21,3 @@ +// A function that helps to tell whether a TargetDecl will be checked. +// We o

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-19 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:22 @@ +21,3 @@ +namespace { +bool IsValidDecl(const Decl *TargetDecl) { + // Ignores using-declarations defined in macros. alexfh wrote: > This method assumes a rather

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-19 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 57790. hokein added a comment. Forgot a comments. http://reviews.llvm.org/D20429 Files: clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tidy/misc/UnusedUsingDeclsCheck.h test/clang-tidy/misc-unused-using-decls.cpp Index: test/clang-tidy/misc-unused-us

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-19 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 57785. hokein marked 4 inline comments as done. hokein added a comment. Address comments. http://reviews.llvm.org/D20429 Files: clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tidy/misc/UnusedUsingDeclsCheck.h test/clang-tidy/misc-unused-using-decls.cp

Re: [PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-19 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:22 @@ +21,3 @@ +namespace { +bool IsValidDecl(const Decl *TargetDecl) { + // Ignores using-declarations defined in macros. -

[PATCH] D20429: [clang-tidy] Handle using-decls with more than one shadow decl.

2016-05-19 Thread Haojian Wu via cfe-commits
hokein created this revision. hokein added a reviewer: alexfh. hokein added subscribers: djasper, cfe-commits. http://reviews.llvm.org/D20429 Files: clang-tidy/misc/UnusedUsingDeclsCheck.cpp clang-tidy/misc/UnusedUsingDeclsCheck.h test/clang-tidy/misc-unused-using-decls.cpp Index: test/cla