[PATCH] D93630: [Attr] Apply GNU-style attributes to expression statements

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 21 05:19:54 PST 2020


vsavchenko created this revision.
Herald added a subscriber: jdoerfert.
vsavchenko requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Before this commit, expression statements could not be annotated
with statement attributes.  Whenever parser found attribute, it
unconditionally assumed that it was followed by a declaration.
This not only doesn't allow expression attributes to have attributes,
but also produces spurious error diagnostics.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93630

Files:
  clang/lib/Parse/ParseStmt.cpp
  clang/test/Parser/stmt-attributes.c
  clang/test/Sema/address_spaces.c
  clang/test/Sema/block-literal.c
  clang/test/SemaTemplate/address_space-dependent.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93630.313087.patch
Type: text/x-patch
Size: 9416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201221/8bb441e7/attachment-0001.bin>


More information about the cfe-commits mailing list