[clang] [clang] Don't assert on perfect overload match with _Atomic (PR #176619)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 19 13:49:04 PST 2026


================
@@ -444,13 +444,13 @@ class Sema;
           if (auto *N = T->getAs<MemberPointerType>();
               N && N->isMemberFunctionPointer())
             T = C.getDecayedType(N->getPointeeType());
-          return T;
+
+          return T.getAtomicUnqualifiedType();
         };
         // The types might differ if there is an array-to-pointer conversion
         // an function-to-pointer conversion, or lvalue-to-rvalue conversion.
         // In some cases, this may happen even if First is not set.
-        assert(C.hasSameUnqualifiedType(Decay(getFromType()),
-                                        Decay(getToType(2))));
+        assert(C.hasSameType(Decay(getFromType()), Decay(getToType(2))));
----------------
keinflue wrote:

The qualifiers are now removed in line 448 via `T.getAtomicUnqualifiedType()` as part of the `Decay` lambda, so I assumed it redundant. But I can keep this line unchanged if that is preferable.

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


More information about the cfe-commits mailing list