[PATCH] D22803: [clang-tidy] Fix an unused-using-decl false positive about template arguments infunction call expression.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 29 08:57:24 PDT 2016


hokein marked an inline comment as done.

================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:84-87
@@ -80,4 +83,6 @@
   if (const auto *Used = Result.Nodes.getNodeAs<NamedDecl>("used")) {
-    if (const auto *Specialization =
-            dyn_cast<ClassTemplateSpecializationDecl>(Used))
+    if (const auto *FD = dyn_cast<FunctionDecl>(Used)) {
+      removeFromFoundDecls(FD->getPrimaryTemplate());
+    } else if (const auto *Specialization =
+            dyn_cast<ClassTemplateSpecializationDecl>(Used)) {
       Used = Specialization->getSpecializedTemplate();
----------------
Have added the new matchers to clang ASTMatchers (D22963, D22957), and switched to use these matchers.


https://reviews.llvm.org/D22803





More information about the cfe-commits mailing list