[clang] [C] Fix issue with -Wimplicit-void-ptr-cast (PR #154351)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 19 07:50:10 PDT 2025


================
@@ -9317,14 +9317,14 @@ AssignConvertType Sema::CheckAssignmentConstraints(QualType LHSType,
   // If we have an atomic type, try a non-atomic assignment, then just add an
   // atomic qualification step.
   if (const AtomicType *AtomicTy = dyn_cast<AtomicType>(LHSType)) {
-    AssignConvertType result =
+    AssignConvertType Result =
         CheckAssignmentConstraints(AtomicTy->getValueType(), RHS, Kind);
-    if (result != AssignConvertType::Compatible)
-      return result;
+    if (!IsAssignConvertCompatible(Result))
----------------
erichkeane wrote:

This also now accepts Pointer-discards-quals and void-ptr-to-non-void-ptr.  Should we have tests for those (particularly OTHER non-atomic qualifiers, since atomics are special)?

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


More information about the cfe-commits mailing list