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

Gauthier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 09:48:59 PDT 2019


Tyker updated this revision to Diff 191115.
Tyker added a comment.

i think we are suppose to hook likely/unlikely on builtin_expected, for if, for, while, switch. but i have no idea how we could hook it if we need to support catch.

i added a revision with likely/unlikely and the correct semantic (i think).

i also added the required checks. i didn't find a way to detect when we are in a catch block. but it should perhaps be allowded.


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

https://reviews.llvm.org/D59467

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaStmtAttr.cpp
  clang/test/SemaCXX/cxx2a-likelihood-attr.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59467.191115.patch
Type: text/x-patch
Size: 7867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190318/d9c2f3b1/attachment.bin>


More information about the cfe-commits mailing list