egorzhdan added a comment.

In D121283#3373560 <https://reviews.llvm.org/D121283#3373560>, @aaron.ballman 
wrote:

> why do we support multiple attribute *specifiers* in the same pragma? I would 
> not expect to be able to mix attribute styles in the same pragma given that 
> all of the individual styles allow you to specify multiple attributes within 
> a single specifier

I don't think I have a strong use case for this. It seemed consistent with the 
way multiple attributes can be added for individual declarations, e.g. 
`__attribute__((cdecl)) __declspec(dllexport) [[noreturn]] void f()`. But we 
can prohibit multiple specifiers within a single pragma if you think that this 
is not a good construct to support.

In D121283#3373560 <https://reviews.llvm.org/D121283#3373560>, @aaron.ballman 
wrote:

> why is whitespace the correct separator as opposed to a comma-delimited list?

My motivation for this was also consistency with the syntax for attributes in 
individual declarations. Given that attribute specifiers are delimited by space 
for individual declarations (`__attribute__((cdecl)) __attribute__((noreturn)) 
void f()`), I think it would be unintuitive to require commas for attribute 
specifiers in pragmas when we could instead reuse the existing syntax of 
space-delimited attribute specifiers.

In D121283#3373560 <https://reviews.llvm.org/D121283#3373560>, @aaron.ballman 
wrote:

> Also, I'd expect there to be some documentation changes along with this patch 
> and a release note.

Good point, thanks, I will add those to this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121283/new/

https://reviews.llvm.org/D121283

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to