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

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Mar 17 14:51:28 PDT 2019


lebedev.ri added a comment.

In D59467#1432675 <https://reviews.llvm.org/D59467#1432675>, @Tyker wrote:

> if likely/unlikely can be applied to any statement or label what should be generated when it is applied to a statement that don't have any conditional branch ? should it be ignored without warning or error ?


Disregard previous [deleted] comment from me.
Yes, i believe it should simply be always accepted, for any `isa<clang::Stmt>()`.
How to model that in codegen i'm not sure yet. Likely by affecting the nearest (up the AST) branch / switch / etc.


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

https://reviews.llvm.org/D59467





More information about the cfe-commits mailing list