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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 22 07:06:14 PDT 2019


aaron.ballman added a comment.

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.)


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

https://reviews.llvm.org/D59467





More information about the cfe-commits mailing list