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

Kees Cook via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 19:21:54 PDT 2025


kees wrote:

Given the preference to keep the diagnostic matching the usage, I'll stick with the originally proposed code changes. I've pushed fixes for the 

> Sorry I should've been clearer. What I'm looking for is a Sema test that checks that the using a `void* __counted_by(...)` pointer works, not just that declaring it works

Okay, I've added this now, if I'm understanding what you're asking for. I can't test for `-std=c11` since it won't accept it. But I think you mean "with -fbounds-safety and GNU mode", which is what I've added.

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


More information about the cfe-commits mailing list