sammccall added inline comments.
================ Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:468 + // Memoize result even doing a single-level match, it might be expensive. + Key.Type = MaxDepth == 1 ? MatchType::Child : MatchType::Descendants; MemoizationMap::iterator I = ResultCache.find(Key); ---------------- sammccall wrote: > This line looks a lot like a cache-poisoning bug, until realizing that > MaxDepth is never actually used as an integer, it's a boolean - 1 means > non-recursive and 0 means recursive. (Note that the recursive call passes > MaxDepth, not MaxDepth-1). > I guess we should just fix the type, actually bounding the depth doesn't seem > likely to be done anytime soon. er, 1 means non-recursive and anything else means recursive... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82771/new/ https://reviews.llvm.org/D82771 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits