================
@@ -4756,18 +4758,22 @@ class FunctionEffect {
/// The description printed in diagnostics, e.g. 'nonblocking'.
StringRef name() const;
- /// Return true if the effect is allowed to be inferred on the callee,
- /// which is either a FunctionDecl or BlockDecl.
+ /// Determine whether the effect is allowed to be inferred on the callee,
+ /// which is either a FunctionDecl or BlockDecl. If the returned optional
+ /// is empty, inference is permitted; otherwise it holds the effect which
+ /// blocked inference.
/// Example: This allows nonblocking(false) to prevent inference for the
/// function.
- bool canInferOnFunction(const Decl &Callee) const;
+ std::optional<FunctionEffect>
+ effectProhibitingInference(const Decl &Callee,
+ const FunctionEffectKindSet &CalleeFX) const;
----------------
Sirraide wrote:
`FunctionEffectKindSet` is so small that we probably want to pass it by value.
https://github.com/llvm/llvm-project/pull/99656
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits