[clang] [clang-tools-extra] `Clang`: `*noreturn` propagation in `CFG` (PR #146355)
Mike Weller via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 1 03:25:04 PDT 2025
================
@@ -2835,8 +2835,37 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C, AddStmtChoice asc) {
if (!FD->isVariadic())
findConstructionContextsForArguments(C);
- if (FD->isNoReturn() || C->isBuiltinAssumeFalse(*Context))
- NoReturn = true;
+ if (!NoReturn)
+ NoReturn = FD->isAnalyzerNoReturn() || C->isBuiltinAssumeFalse(*Context);
+
+ // Some well-known 'noreturn' functions
----------------
MikeWeller wrote:
Can we consolidate this list with the one in `NoReturnFunctionChecker.cpp`? Or at least reference the other one to remind people to update both.
https://github.com/llvm/llvm-project/pull/146355
More information about the cfe-commits
mailing list