[PATCH] D66945: [clang-tidy] Fix a false positive in unused-using-decl check.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 04:32:05 PDT 2019


gribozavr added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp:105
   }
   // Mark using declarations as used by setting FoundDecls' value to zero. As
   // the AST is walked in order, usages are only marked after a the
----------------
Please move the comment below the lambda. The lambda is not doing what this comment says.


================
Comment at: clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp:138
         removeFromFoundDecls(RD);
+    } else if (Used->getKind() == TemplateArgument::Declaration) {
+      RemoveNamedDecl(Used->getAsDecl());
----------------
Could you add a test for this case?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66945/new/

https://reviews.llvm.org/D66945





More information about the cfe-commits mailing list