[clang] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 19 01:25:13 PDT 2025


================
@@ -2028,7 +2028,9 @@ void StmtPrinter::VisitAtomicExpr(AtomicExpr *Node) {
       Node->getOp() != AtomicExpr::AO__atomic_load_n &&
       Node->getOp() != AtomicExpr::AO__scoped_atomic_load_n &&
       Node->getOp() != AtomicExpr::AO__opencl_atomic_load &&
-      Node->getOp() != AtomicExpr::AO__hip_atomic_load) {
+      Node->getOp() != AtomicExpr::AO__hip_atomic_load &&
+      Node->getOp() != AtomicExpr::AO__atomic_test_and_set &&
+      Node->getOp() != AtomicExpr::AO__atomic_clear) {
----------------
cor3ntin wrote:

Are there other places we do a similar check? Maybe we need that to me a member function of AtomicExpr

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


More information about the cfe-commits mailing list