[Attr] Apply GNU-style attributes to expression statements
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. In order to maintain all previously compiled code, we still assume that GNU attributes are followed by declarations unless ALL of those are statement attributes. And even in this case we are not forcing the parser to think that it should parse a statement, but rather let it proceed as if no attributes were found. Differential Revision: https://reviews.llvm.org/D93630
Loading
Please sign in to comment