Hana =?utf-8?q?Dusi=CC=81kova=CC=81?= <[email protected]>,
Hana =?utf-8?q?Dusi=CC=81kova=CC=81?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -16268,6 +16353,25 @@ class VoidExprEvaluator
}
}
+ bool VisitAtomicExpr(const AtomicExpr *E) {
+ if (!EvaluateAtomicOrder(E, Info))
+ return false;
+
+ switch (E->getOp()) {
+ default:
+ return Error(E);
----------------
AaronBallman wrote:
Does this do the correct thing for code like:
```
constexpr int foo(const int *ptr) {
(void)__atomic_load_n(ptr, __ATOMIC_RELAXED);
return 12;
}
constexpr int i = 12;
static_assert(foo(&i) == 12);
```
I would expect that to compile and pass the static assertion.
https://github.com/llvm/llvm-project/pull/98756
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits