[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

Bruno Ricci via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 07:08:47 PDT 2019


riccibruno added a comment.

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

> In D59467#1439473 <https://reviews.llvm.org/D59467#1439473>, @riccibruno wrote:
>
> > Hmm, it seems that an attribute is not allowed by the grammar in the `expression` or `assignment-expression` of a `conditional-expression`. Was that intended when `[[likely]]` was added ?
>
>
> Attributes do not appertain to expressions, so yes, that was intentional when we added `likely`. (You can have an attribute applied to an expression statement, but that's at a level that doesn't seem too useful for these attributes.)


Good to know, thanks !


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

https://reviews.llvm.org/D59467





More information about the cfe-commits mailing list