[PATCH] D20326: [clang-tidy] Fix a template function false positive in misc-unused-using-decls check.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 01:06:14 PDT 2016


hokein marked an inline comment as done.

================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:24
@@ +23,3 @@
+// FIXME: Add a node matcher for UnresolvedLookupExpr in ASTMatcher.
+AST_MATCHER(CallExpr, hasUnresolvedLookupExpr) {
+  return isa<UnresolvedLookupExpr>(Node.getCallee());
----------------
alexfh wrote:
> Sorry for being unclear. Please change this to the node matcher in this patch. You can move the matcher to the ASTMatchers.h as a follow-up. `hasUnresolvedLookupExpr` is not in line with the matchers design: the `CallExpr` node has no property `UnresolvedLookupExpr`. You'll also be able to bind the `UnresolvedLookupExpr` to an identifier and make the code in `check()` slightly shorter.
Done. But currently we can't bind the `UnresolvedLookupExpr` directly since the `AST_MATCHER` doesn't provide a bind function here.


http://reviews.llvm.org/D20326





More information about the cfe-commits mailing list