[clang] [clang][SSAF] Optionally skip system-header contributors (PR #205446)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 24 01:04:50 PDT 2026


================
@@ -61,9 +69,28 @@ class ContributorFinder : public DynamicRecursiveASTVisitor {
   bool VisitLambdaExpr(LambdaExpr *L) override {
     // TraverseLambdaExpr directly visits the body stmt, skipping the
     // CXXMethodDecl, which is a contributor that needs to be collected.
+    // The system-header gate fires via the delegated VisitFunctionDecl
+    // (the call operator's spelling location is the lambda's source
+    // location), so no separate gate here.
     VisitFunctionDecl(L->getCallOperator());
     return true;
----------------
steakhal wrote:

Speaking of recursively decomposing things, it is actually surprising to me that we return `true` - regardless of that the decomposed call returns. This is suspicious. What if that handler wants to stop?

https://github.com/llvm/llvm-project/pull/205446


More information about the cfe-commits mailing list