[clang] [Clang] Treat the body of an expansion statement with expansion size 0 as discarded (PR #212319)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 4 22:22:28 PDT 2026
================
@@ -3651,6 +3651,20 @@ static bool hasDeducedReturnType(FunctionDecl *FD) {
return FPT->getReturnType()->isUndeducedType();
}
+/// Build a return statement that is in a discarded context.
+static StmtResult BuildDiscardedReturnStmt(Sema &S, Expr *RetValExp,
+ SourceLocation ReturnLoc) {
+ if (RetValExp) {
----------------
ojhunt wrote:
As ever I will always prefer early return :D
https://github.com/llvm/llvm-project/pull/212319
More information about the cfe-commits
mailing list