================

----------------
Lancern wrote:

Not a blocker for this PR, but to ensure compile-time constant folding a better 
way would be to rely on the clang constant evaluator instead:

```cpp
std::optional<Expr::EvalResult> constOrdering;
if (Expr::EvalResult eval; expr->getArg(0)->EvaluateAsInt(eval, 
cgf.getContext()))
  constOrdering.emplace(eval);

if (!constOrdering.has_value()) {
  cgf.cgm.errorNYI("Variable atomic fence ordering");
  return;
}

// ...
```

https://github.com/llvm/llvm-project/pull/171248
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to