[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 26 12:09:12 PDT 2019
rsmith added a comment.
In D64838#1602840 <https://reviews.llvm.org/D64838#1602840>, @Nathan-Huckleberry wrote:
> I agree that parsing according to attribute name/type is not a good solution.
>
> It sounds like we have narrowed it down to two choices:
> Do we want to follow the gcc method of parsing once and falling back if parsing fails?
> Do we want to parse attributes first and then wait until we see a decl-specifier (breaking the implicit int case)?
I don't think so. A GCC attribute is a decl-specifier, so should trigger implicit-int in the languages that have it.
Option 1: teach the statement/declaration disambiguation code that an initial GNU attribute does not resolve the ambiguity and that it needs to disambiguate past one.
Option 2: parse the attributes and then call the disambiguation code and tell it that we've already consumed a decl-specifier.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64838/new/
https://reviews.llvm.org/D64838
More information about the cfe-commits
mailing list