[clang] [Clang] FunctionEffects: accept throw-only callees from noexcept callers (PR #238401)
Doug Wyatt via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 11:49:52 PST 2026
================
@@ -484,6 +509,13 @@ class CompleteFunctionAnalysis {
return InferrableEffectToFirstViolation.lookup(Effect);
}
+ // True if every reason this function lacks Effect is an exception escaping
+ // it, i.e. it would have the effect but for throwing.
+ bool isThrowOnly(FunctionEffect Effect) {
----------------
dougsonos wrote:
This allowed a few other methods to become const. The cost is that `lookupMutable()` also becomes const, which is a little confusing, but [a] I'm a bit obsessive about avoiding repetition, and [b] it's a private method of a tiny class.
https://github.com/llvm/llvm-project/pull/238401
More information about the cfe-commits
mailing list