[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)

Yeoul Na via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 5 14:01:38 PST 2025


================
@@ -272,6 +286,11 @@ GetCountedByAttrOnIncompletePointee(QualType Ty, NamedDecl **ND) {
   if (!PointeeTy->isIncompleteType(ND))
     return {};
 
+  // If counted_by is on void*, it was already validated at declaration time
+  // as a GNU extension. No need to re-check GNU mode here.
----------------
rapidsna wrote:

This comment seems outdated also.

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


More information about the cfe-commits mailing list