[clang] nolock/noalloc attributes (PR #84983)

Doug Wyatt via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 14 17:56:02 PDT 2024


dougsonos wrote:

> > have you tried maybe simply not setting `Changed` to `true` (perhaps only in C mode)?
> 
> It’s worth pointing out that C also warns (and C23 straight-up _errors_) if you replace `nolock` w/ `noreturn` iirc, so either that’s also a bug or that’s intended; I think I was going to ask Aaron about this as he’s the C expert, but I forgot about that too, again because of the `AttributedType` stuff.

I was testing with `noreturn` earlier. It's hard to compare, because (at least in C23):
```
../clang/test/Sema/attr-nolock-wip.cpp:15:19: error: 'noreturn' attribute cannot be applied to types
   15 | void noret(int) [[noreturn]];
      |                   ^
```

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


More information about the cfe-commits mailing list