================
@@ -15609,6 +15661,10 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope
*FnBodyScope, Decl *D,
getCurLexicalContext()->getDeclKind() != Decl::ObjCImplementation)
Diag(FD->getLocation(), diag::warn_function_def_in_objc_container);
+ if (Context.hasAnyFunctionEffects())
+ if (const auto FX = FD->getFunctionEffects(); !FX.empty())
+ maybeAddDeclWithEffects(FD, FX);
----------------
dougsonos wrote:
Factored this 3-line sequence into an inline method of `Sema` (which has to be
templated to accommodate `FunctionDecl` vs. `BlockDecl`).
https://github.com/llvm/llvm-project/pull/99656
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits