[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG39969c7d3a6d: [Sema][SVE] Reject sizeof and alignof for sizeless types (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75572/new/

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-04 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a reviewer: rsmith. efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Please give it a day or two before you merge in case someone else has an opinion on the new API. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D75572#1904517 , @efriedma wrote: > I think the specialized error messages are useful. I don't have a strong > opinion on what order the patches should land. OK. The new version keeps the tailored diagnostic but emits

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 248215. rsandifo-arm added a comment. Changes in v2: - Emit the diagnostic from RequireCompleteTypeImpl instead of checking for sizeless types separately. This implements option 3. from the earlier discussion. - Reformat the patch using

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I think the specialized error messages are useful. I don't have a strong opinion on what order the patches should land. The difference between emitting the diagnostic in RequireCompleteType, vs. letting the caller do it, is basically just that it's harder to forget

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-03 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D75572#1904415 , @efriedma wrote: > The planned changes to RequireCompleteType should catch this, right? If we > want a specialized diagnostic for sizeless types in RequireCompleteType, we > should probably just pass it

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Just looked at the comment on D75572 ; not sure if RequireCompleteType is going to reject sizeless types. In any case, you have to instantiate templates using RequireCompleteType before you can determine whether a type is sizeless.

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The planned changes to RequireCompleteType should catch this, right? If we want a specialized diagnostic for sizeless types in RequireCompleteType, we should probably just pass it to RequireCompleteType. (Otherwise, you'll end up with the "wrong" diagnostic in

[PATCH] D75572: [Sema][SVE] Reject sizeof and alignof for sizeless types

2020-03-03 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: sdesmalen, efriedma, rovka, rjmccall. Herald added subscribers: cfe-commits, psnobl, rkruppe, tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. rsandifo-arm added parent revisions: D75570: [AST][SVE] Add