[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 6 21:07:44 PST 2025


================
@@ -17893,4 +17996,441 @@ std::optional<bool> EvaluateBuiltinIsWithinLifetime(IntExprEvaluator &IEE,
   IsWithinLifetimeHandler handler{Info};
   return findSubobject(Info, E, CO, Val.getLValueDesignator(), handler);
 }
+
 } // namespace
+
+static bool EvaluateAtomicOrder(const AtomicExpr *E, EvalInfo &Info) {
+  // we ignore results, but we need to evaluate them
+  [[maybe_unused]] APSInt OrderIgnoredResult;
----------------
tbaederr wrote:

All the `[[maybe_unused]]` seem unnecessary.

https://github.com/llvm/llvm-project/pull/98756


More information about the cfe-commits mailing list