ziqingluo-90 added inline comments.
================ Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:54-55 + bool TraverseDecl(Decl *Node) { + if (!Node) + return true; + if (!match(*Node)) ---------------- steakhal wrote: > Can `Node` be ever null if the visitor is initiated only be `AST_MATCHER_P`? Honestly I do not know the exact answer to your question. I was imagining that an AST node could have a null to be one of its children. Our plan later is to make this matcher a general alternative to `forEachDescendant`, so I think the check for null here is not over-defensive. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138329/new/ https://reviews.llvm.org/D138329 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits