[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 31 10:43:30 PDT 2020


Mordante updated this revision to Diff 302103.
Mordante added a comment.

`Sema::ActOnLabelStmt` now processes the statement attributes placed on the `LabelDecl`. Returning an `AttributedStmt` from this function seems to work as intended. This changes the behaviour of `[[nomerge]]` being allowed on labels. `[[nomerge]]` has been introduced in  D79121 <https://reviews.llvm.org/D79121>.


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

https://reviews.llvm.org/D86559

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Parse/ParseStmt.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/lib/Sema/SemaStmt.cpp
  clang/lib/Sema/TreeTransform.h
  clang/test/AST/ast-dump-attr.cpp
  clang/test/Sema/attr-likelihood.c
  clang/test/Sema/attr-nomerge.cpp
  clang/test/SemaCXX/attr-likelihood.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86559.302103.patch
Type: text/x-patch
Size: 7322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201031/a996d2d7/attachment-0001.bin>


More information about the cfe-commits mailing list