[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)
via cfe-commits
cfe-commits at lists.llvm.org
Sat May 4 09:40:31 PDT 2024
================
@@ -768,6 +776,18 @@ class Sema final : public SemaBase {
/// Warn when implicitly casting 0 to nullptr.
void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E);
+ // ----- function effects ---
+
+ /// Warn when implicitly changing function effects.
+ void diagnoseFunctionEffectConversion(QualType DstType, QualType SrcType,
+ SourceLocation Loc);
+
+ /// Try to parse the conditional expression attached to an effect attribute
+ /// (e.g. 'nonblocking'). (c.f. Sema::ActOnNoexceptSpec). If RequireConstexpr,
+ /// then this will fail if the expression is dependent.
+ ExprResult ActOnEffectExpression(Expr *CondExpr, FunctionEffectMode &Mode,
+ bool RequireConstexpr = false);
----------------
Sirraide wrote:
What is the `RequireConstexpr` parameter for? It’s always `false` from what I can tell.
https://github.com/llvm/llvm-project/pull/84983
More information about the cfe-commits
mailing list