[clang] [Clang][Sema] Allow counted_by on void* as GNU extension (PR #164737)
Kees Cook via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 6 12:13:45 PST 2025
================
@@ -1211,11 +1211,13 @@ llvm::Value *CodeGenFunction::emitCountedByPointerSize(
getContext().getTypeSizeInChars(ElementTy->getPointeeType());
if (ElementSize.isZero()) {
- // This might be a __sized_by on a 'void *', which counts bytes, not
- // elements.
+ // This might be a __sized_by (or __counted_by in GNU mode) on a
----------------
kees wrote:
Oops! Yes, I will adjust this.
https://github.com/llvm/llvm-project/pull/164737
More information about the cfe-commits
mailing list