erichkeane added inline comments.
================ Comment at: clang/lib/Sema/SemaExprMember.cpp:1300 + // warning defaults to an error. + if (const auto *ATy = BaseType->getAs<AtomicType>()) { + S.Diag(OpLoc, diag::warn_atomic_member_access); ---------------- This seems to apply to both C and C++. I guess "_Atomic" is C only, so we get to define its behavior for C++? What does GCC do in C++ mode? ================ Comment at: clang/test/Sema/atomic-expr.c:85 + x.val = 12; // expected-error {{accessing a member of an atomic structure or union is undefined behavior}} + xp->val = 12; // expected-error {{accessing a member of an atomic structure or union is undefined behavior}} + ---------------- This still catches RHS access as well, right? Also, does it still 'work' with the non-qualifier version of _Atomic? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122656/new/ https://reviews.llvm.org/D122656 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits