Following a suggestion from Erich in https://reviews.llvm.org/D148101,
this patch bumps AS_GNU to 1 so that syntax 0 is invalid. It also
asserts that the syntax is in range.
Details
- Reviewers
erichkeane aaron.ballman - Commits
- rG053bdb77b0ce: [clang] Bump AS_GNU to 1
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This LGTM, though curious about the re-ordering.
clang/include/clang/Basic/AttributeCommonInfo.h | ||
---|---|---|
135 | Did these two ctors swap places somehow? There's something goofy going on here? Or is this just to make the delegation of ctors more sensible? |
clang/include/clang/Basic/AttributeCommonInfo.h | ||
---|---|---|
28 | Note for others: we're now at 11 items (10 items + starting at 1), stored in 4 bits. So this doesn't cause problems. In the future, once we're sure the '0' case isn't being used/abused for a while (god help my downstream...), we can start re-using 0. |
clang/include/clang/Basic/AttributeCommonInfo.h | ||
---|---|---|
135 | Ah, yeah, I should have mentioned that, sorry. The most general constructor was previously the second in the list. Like you say, I moved it up to make the delegation more obvious. The other three keep their relative order. |
clang/include/clang/Basic/AttributeCommonInfo.h | ||
---|---|---|
135 | Thanks for explaining, sounds good to me. |
Gah, sorry. Due to a botched git operation, I posted a first cut with a stupid typo, rather than the version that passed testing.
Note for others: we're now at 11 items (10 items + starting at 1), stored in 4 bits. So this doesn't cause problems. In the future, once we're sure the '0' case isn't being used/abused for a while (god help my downstream...), we can start re-using 0.