[clang] [Clang] Fix looking for immediate calls in default arguments. (PR #80690)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 6 14:30:59 PST 2024


================
@@ -6222,9 +6222,9 @@ struct ImmediateCallVisitor : public RecursiveASTVisitor<ImmediateCallVisitor> {
 
   // Blocks don't support default parameters, and, as for lambdas,
   // we don't consider their body a subexpression.
-  bool VisitBlockDecl(BlockDecl *B) { return false; }
+  bool VisitBlockDecl(BlockDecl *B) { return true; }
 
-  bool VisitCompoundStmt(CompoundStmt *B) { return false; }
+  bool VisitCompoundStmt(CompoundStmt *B) { return true; }
----------------
AaronBallman wrote:

I think we can just remove these entirely; the default implementation already returns true.

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


More information about the cfe-commits mailing list