[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 08:27:53 PST 2025
AaronBallman wrote:
> Oh, just thought of one more thing: we probably want a c23_compat warning for this (assuming the language is new in c23).
Good catch -- this is new in C23. C17 said: "Types other than pointer types whose referenced type is an object type shall not be restrict-qualified."
So there's two diagnostics needed: one is an `Extension` warning (so it fires in `-pedantic`) for use of an extension pre-C23, and the other is `Warning`, `DefaultIgnore` for code which is incompatible with standards before C23. (And test coverage for both).
https://github.com/llvm/llvm-project/pull/120896
More information about the cfe-commits
mailing list