[clang] [clang][Sema] Early exit when default arg contains errors (PR #175582)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 22 20:15:52 PST 2026


================
@@ -3190,6 +3190,11 @@ bool Sema::SubstDefaultArgument(
            << FD << PatternExpr->getSourceRange();
   }
 
+  // Exit early if argument has error, we should've emitted the diagnostic when
----------------
shafik wrote:

Yeah, it is not clear to me this is a great solution, what is the diagnostic emitted look like? Have you looked into catching this at an earlier point?

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


More information about the cfe-commits mailing list