[libc-commits] [libc] [libc] Prefix sanitizer macros with LIBC_ (PR #205002)

via libc-commits libc-commits at lists.llvm.org
Mon Jun 22 09:00:02 PDT 2026


lntue wrote:

> If these are being leaked into user headers, we should use a reserved identifier:
> 
> 7.1.3 "All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use, except those identifiers which are lexically identical to keywords"
> 
> I haven't looked at how these leak in, but I suspect we should prefix them with a double underscore. WDYT?

I'm more in favor of prefixing all our macros with `LIBC_` for consistency.  About leaking via math headers, it's probably hard to guard all of those utility headers, as they are used one way or another.  Hopefully the numbers are limited for us to check case-by-case.

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


More information about the libc-commits mailing list