[clang] [NFC][clang] Quote literal builtin attribute markers in Builtins.def docs (PR #160080)
Radovan Božić via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 24 05:25:27 PDT 2025
bozicrHT wrote:
> > > > But I'm not sure what we could use reasonably.
> > >
> > >
> > > We could replace it w/ e.g. `*` and add a note along the lines of ‘where `*` is any integer/index/whatever it’s actually supposed to be’
> >
> >
> > Asterisk seems pretty overloaded here... maybe the same except with `{num}` or something like that?
>
> What about using two letters, e.g., `"nn"`, to mark `nonnull`?
I experimented with using `"nn"` as the marker for builtin nonnull, but that caused 137 test failures (in SemaHLSL, SemaSPIRV, CodeGenSPIRV, CodeGenHLSL, etc.). Using `"{null}"` reduced it to 3 failing tests:
```
Clang :: CodeGen/AArch64/strictfp-builtins.c
Clang :: CodeGen/X86/strictfp_builtins.c
Clang :: CodeGen/strictfp_builtins.c
```
The most stable option so far is **`"NN"`**, where all tests pass.
https://github.com/llvm/llvm-project/pull/160080
More information about the cfe-commits
mailing list