[clang] [CIR] -Wreturn-type (1/2): Add an analysis classifying how control reaches a function's end (PR #239774)

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 4 20:45:33 PST 2026


bcardosolopes wrote:

@xlauko done. 

> Three inputs give a different result from Sema's CFG check. Marking them NYI and pinning them with tests is fine for this PR.

Unsupported constructs make the function Unknown instead of a guess, no emitError or crash, since the code is valid. Each one is recorded and reported as a missed remark, and (int the next PR) the Sema hookup will fall back to the CFG for Unknown. Cases as cheap to fix as to detect (caught throws, noreturn temporaries in `?:`) are fixed instead.

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


More information about the cfe-commits mailing list