================
@@ -78,7 +78,13 @@ namespace {
// the qualifier.
if (!S.Context.getLangOpts().ObjC && !DestType->isRecordType() &&
!DestType->isArrayType() && !DestType.getPointerAuth()) {
- DestType = DestType.getAtomicUnqualifiedType();
+ if (S.Context.getLangOpts().CPlusPlus) {
+ // Note that in C++, _Atomic(T) is a distinct type, not a
+ // cv-qualifier, so it is not stripped.
+ DestType = DestType.getUnqualifiedType();
+ } else {
+ DestType = DestType.getAtomicUnqualifiedType();
+ }
----------------
AZero13 wrote:
I explained that already. You have to strip the qualifier here.
C23 says you must strip away the atomic.
C++ says you do not.
https://github.com/llvm/llvm-project/pull/207616
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits