[PATCH] D75573: [Sema][SVE] Reject aligned/_Alignas 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 project: clang. A previous patch rejected alignof for sizeless types. This patch extends that to cover the "alig

[PATCH] D62962: Clang implementation of sizeless types

2020-03-03 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D62962#1887242 , @efriedma wrote: > Can you make a list of the complete stack of patches here? Sorry for the slow reply, I was out last week. I've updated the stack for this revision: the only parent patch is D62961

[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] D75570: [AST][SVE] Add new Type queries for sizeless types

2020-03-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 248125. rsandifo-arm added a comment. Run git-clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75570/new/ https://reviews.llvm.org/D75570 Files: clang/include/clang/AST/CanonicalType.h clan

[PATCH] D75571: [Sema][SVE] Add tests for valid and invalid type usage

2020-03-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 248135. rsandifo-arm added a comment. Changes in v2: - Reformat the tests using git-clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75571/new/ https://reviews.llvm.org/D75571 Files: clang/te

[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 git-clang-for

[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] D75571: [Sema][SVE] Add tests for valid and invalid type usage

2020-03-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 248601. rsandifo-arm added a comment. Changes in v3: - Prune the number of RUN: lines. - Minor tweaks to the tests themselves. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75571/new/ https://reviews.llv

[PATCH] D75571: [Sema][SVE] Add tests for valid and invalid type usage

2020-03-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked 2 inline comments as done. rsandifo-arm added inline comments. Comment at: clang/test/SemaCXX/sizeless-1.cpp:8 +// RUN: %clang_cc1 -fcxx-exceptions -fsyntax-only -verify -W -Wall -Wrange-loop-analysis -triple arm64-linux-gnu -target-feature +sve -std=c++17 %s

[PATCH] D75573: [Sema][SVE] Reject aligned/_Alignas for sizeless types

2020-03-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 248672. rsandifo-arm added a comment. Apply changes from git-clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75573/new/ https://reviews.llvm.org/D75573 Files: clang/include/clang/Basic/Diagn

[PATCH] D75734: [Sema][SVE] Reject atomic sizeless types

2020-03-06 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, jfb, rkruppe, tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. rsandifo-arm added a parent revision: D75573: [Sema][SVE]

[PATCH] D75737: [Sema][SVE] Don't allow fields to have sizeless type

2020-03-06 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 a parent revision: D75736: [Sema][SVE] Don't

[PATCH] D75738: [Sema][SVE] Reject by-copy capture of sizeless types

2020-03-06 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 project: clang. rsandifo-arm added a parent revision: D75737: [Sema][SVE] Don't allow fields to have sizeless typ

[PATCH] D75736: [Sema][SVE] Don't allow static or thread-local variables to have sizeless type

2020-03-06 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 project: clang. rsandifo-arm added a parent revision: D75734: [Sema][SVE] Reject atomic sizeless types. rsandifo-

[PATCH] D75570: [AST][SVE] Add new Type queries for sizeless types

2020-03-10 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Herald added a subscriber: danielkiss. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75570/new/ https://reviews.llvm.org/D75570 ___ cfe-commits mailing list cfe-commi

[PATCH] D75570: [AST][SVE] Add new Type queries 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 rGfa8080376e73: [AST][SVE] Add new Type queries for sizeless types (authored by rsandifo-arm). Changed prior to commit: https://reviews.llvm.org/D75570?vs=248125&id=249961#toc Repository: rG LLVM Githu

[PATCH] D75571: [Sema][SVE] Add tests for valid and invalid type usage

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. rsandifo-arm marked an inline comment as done. Closed by commit rGf09c7d642afa: [Sema][SVE] Add tests for valid and invalid type usage (authored by rsandifo-arm). Changed prior to commit: https://reviews.llvm.org/D75571?v

[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] D75734: [Sema][SVE] Reject atomic 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 rGadb290d97482: [Sema][SVE] Reject atomic sizeless types (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75734/new/ https://reviews.

[PATCH] D75573: [Sema][SVE] Reject aligned/_Alignas 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 rG627b5c12068c: [Sema][SVE] Reject aligned/_Alignas for sizeless types (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75573/new/ ht

[PATCH] D75736: [Sema][SVE] Don't allow static or thread-local variables to have sizeless type

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf8700db7f150: [Sema][SVE] Don't allow static or thread-local variables to have sizeless type (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D75737: [Sema][SVE] Don't allow fields to have sizeless type

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 249990. rsandifo-arm added a comment. Add a test for the BuildCaptureField change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75737/new/ https://reviews.llvm.org/D75737 Files: clang/include/clang/Basi

[PATCH] D75737: [Sema][SVE] Don't allow fields to have sizeless type

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked 2 inline comments as done. rsandifo-arm added inline comments. Comment at: clang/lib/Sema/SemaLambda.cpp:1633 +if (RequireCompleteSizedType(Loc, FieldType, + diag::err_field_incomplete_or_sizeless)) { RD->setInvalidDe

[PATCH] D76082: [Sema][SVE] Reject arrays of sizeless types

2020-03-12 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 a parent revision: D75738: [Sema][SVE] Rejec

[PATCH] D76084: [Sema][SVE] Reject subscripts on pointers to sizeless types

2020-03-12 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 project: clang. rsandifo-arm added a parent revision: D76082: [Sema][SVE] Reject arrays of sizeless types. rsandi

[PATCH] D76088: [Sema][SVE] Don't allow sizeless objects to be thrown

2020-03-12 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 project: clang. The same rules for throwing and catching incomplete types also apply to sizeless types. This pat

[PATCH] D76086: [Sema][SVE] Reject arithmetic on pointers to sizeless types

2020-03-12 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 project: clang. rsandifo-arm added a parent revision: D76084: [Sema][SVE] Reject subscripts on pointers to sizele

[PATCH] D76087: [Sema][SVE] Reject sizeless types in exception specs

2020-03-12 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 project: clang. rsandifo-arm added a parent revision: D76086: [Sema][SVE] Reject arithmetic on pointers to sizele

[PATCH] D76090: [Sema][SVE] Don't allow sizeless types to be caught

2020-03-12 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 project: clang. rsandifo-arm added a parent revision: D76088: [Sema][SVE] Don't allow sizeless objects to be thro

[PATCH] D76088: [Sema][SVE] Don't allow sizeless objects to be thrown

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D76088#1920070 , @efriedma wrote: > Why is throwing an `svint8_t *` an error? I don't see any obvious reason to > forbid that. Yeah, I agree there's no obvious reason why it wouldn't work. The same reasoning applies h

[PATCH] D76086: [Sema][SVE] Reject arithmetic on pointers to sizeless types

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D76086#1920096 , @efriedma wrote: > Do we really want to forbid this? The expected semantics are clear, and the > obvious lowering to getelementptr just works. The problem is that pointer arithmetic is really a form of

[PATCH] D76087: [Sema][SVE] Reject sizeless types in exception specs

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 250062. rsandifo-arm added a comment. Allow pointers to sizeless types to be thrown. In response to Eli's comments in D76088 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D76088: [Sema][SVE] Don't allow sizeless objects to be thrown

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 250066. rsandifo-arm added a comment. Allow pointers to sizeless types to be thrown. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76088/new/ https://reviews.llvm.org/D76088 Files: clang/include/clang/B

[PATCH] D76088: [Sema][SVE] Don't allow sizeless objects to be thrown

2020-03-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D76088#1920241 , @efriedma wrote: > We already have a special case for void* here; it's trivial to extend that to > also check for sizeless types. I don't want to add weird semantic > restrictions just to save a few chara

[PATCH] D76086: [Sema][SVE] Reject arithmetic on pointers to sizeless types

2020-03-13 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D76086#1920558 , @efriedma wrote: > People are going to want to iterate over arrays in memory to write simple > intrinsic loops. If we don't allow `p + i` to work, people will be forced to > write `(__SVInt8_t*)((char*)p

[PATCH] D76090: [Sema][SVE] Don't allow sizeless types to be caught

2020-03-13 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 250273. rsandifo-arm added a comment. Allow pointers to sizeless types to be caught. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76090/new/ https://reviews.llvm.org/D76090 Files: clang/include/clang/B

[PATCH] D75737: [Sema][SVE] Don't allow fields to have sizeless type

2020-03-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. rsandifo-arm marked an inline comment as done. Closed by commit rGb50d80c1ee1f: [Sema][SVE] Don't allow fields to have sizeless type (authored by rsandifo-arm). Changed prior to commit: https://reviews.llvm.org/D75737?vs=

[PATCH] D75738: [Sema][SVE] Reject by-copy capture of sizeless types

2020-03-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c5c60a493ca: [Sema][SVE] Reject by-copy capture of sizeless types (authored by rsandifo-arm). Changed prior to commit: https://reviews.llvm.org/D75738?vs=248702&id=250281#toc Repository: rG LLVM Git

[PATCH] D76082: [Sema][SVE] Reject arrays of sizeless types

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

[PATCH] D76084: [Sema][SVE] Reject subscripts on pointers to sizeless types

2020-03-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D76084#1920103 , @efriedma wrote: > I'm not sure we actually want to reject this; let's discuss on the review for > D76086 , since subscripting is sort of a > special case of arithmetic.

[PATCH] D76218: [Sema][SVE] Reject "new" with sizeless types

2020-03-16 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 a parent revision: D76090: [Sema][SVE] Don't

[PATCH] D76219: [Sema][SVE] Reject "delete" with sizeless types

2020-03-16 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 a parent revision: D76218: [Sema][SVE] Rejec

[PATCH] D76221: [Sema][SVE] Flip default RequireCompleteType behavior for sizeless types

2020-03-16 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, danielkiss, psnobl, jfb, rkruppe, kristof.beyls, tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. rsandifo-arm added a parent re

[PATCH] D76084: [Sema][SVE] Reject subscripts on pointers to sizeless types

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

[PATCH] D76090: [Sema][SVE] Don't allow sizeless types to be caught

2020-03-17 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG72ffb16b4cde: [Sema][SVE] Don't allow sizeless types to be caught (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76090/new/ https

[PATCH] D76088: [Sema][SVE] Don't allow sizeless objects to be thrown

2020-03-17 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc47f971694be: [Sema][SVE] Don't allow sizeless objects to be thrown (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76088/new/ htt

[PATCH] D76087: [Sema][SVE] Reject sizeless types in exception specs

2020-03-17 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG094729690207: [Sema][SVE] Reject sizeless types in exception specs (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76087/new/ http

[PATCH] D76086: [Sema][SVE] Reject arithmetic on pointers to sizeless types

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

[PATCH] D76218: [Sema][SVE] Reject "new" with sizeless types

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

[PATCH] D76219: [Sema][SVE] Reject "delete" with sizeless types

2020-03-17 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4ece6f051bd0: [Sema][SVE] Reject "delete" with sizeless types (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76219/new/ https://r

[PATCH] D139028: [RFC][clang] Add attribute-like keywords

2023-02-28 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks @aaron.ballman and @erichkeane for the comments. I'll split it into stages and use tablegen more, like you say. In D139028#4150761 , @aaron.ballman wrote: > One thing that might also help is to split this into a fe

[PATCH] D147657: [Sema] Fix reporting of invalid shader attribute on HLSL entry function

2023-04-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: python3kgae, erichkeane. Herald added a subscriber: Anastasia. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If the HLSL entry fun

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: arphaman, erichkeane. Herald added a reviewer: aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Two calls to mergeAvai

[PATCH] D147657: [Sema] Fix reporting of invalid shader attribute on HLSL entry function

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG03a9a1e664de: [Sema] Fix reporting of invalid shader attribute on HLSL entry function (authored by rsandifo-arm). Repository: rG LLVM Github Monor

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 511425. rsandifo-arm added a comment. Add AST dump test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147661/new/ https://reviews.llvm.org/D147661 Files: clang/lib/Sema/SemaDeclAttr.cpp clang/test/Sem

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D147661#4248574 , @erichkeane wrote: > I think the change is probably fine, Thanks! > but can you add an AST-dump test for this one? Sure. How does this look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D147661#4249004 , @erichkeane wrote: > This test doesn't show a change in behavior. Yeah. Is there a way to force the syntax and spelling fields to be dumped, even for implicit attributes? I was struggling to find one

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-10 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. > I threw together a patch to make the constructors `explicit` and the only two > compile failures I have are with what you're fixing in this patch. If you'd > like, I can commandeer this patch and subsume it with the larger refactor. > Alternatively, we can land t

[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The purpose of this patch and follow-on patches is to ens

[PATCH] D148102: [clang] Specify attribute syntax & spelling with a single argument

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cf

[PATCH] D148103: [clang] Allow attributes to be constructed from keyword tokens

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds an extra AttributeCommonInfo::Form constr

[PATCH] D148104: [clang] Type safety tweak for AttributeCommonInfo::Form

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds static functions for constructing most At

[PATCH] D148105: [clang] Fix FIXME in isAlignasAttribute()

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. AttributeCommonInfo::isAlignasAttribute() was used in one

[PATCH] D148105: [clang] Fix FIXME in isAlignasAttribute()

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. FWIW, the original reason for looking at this was to explore ways of removing `AS_AttributeLikeKeyword` from https://reviews.llvm.org/D139028 . I wanted to find a way of conveying extra information about a spelling without having to change the existing enums. It

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Following a suggestion from Erich in https://reviews.llvm

[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:55 + +/// The attibute has no source code manifestation and is only created +/// implicitly. erichkeane wrote: > If I recall, there was some pretty awful funny

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:135 AttributeCommonInfo(const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, erichkeane wrote: > Did the

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 512947. rsandifo-arm added a comment. Gah, sorry. Due to a botched git operation, I posted a first cut with a stupid typo, rather than the version that passed testing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D148102: [clang] Specify attribute syntax & spelling with a single argument

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 512993. rsandifo-arm added a comment. Tweak initializer to avoid an MSVC error: https://godbolt.org/z/sMxsW8G8j Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148102/new/ https://reviews.llvm.org/D148102 F

[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe841d5092634: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148

[PATCH] D148102: [clang] Specify attribute syntax & spelling with a single argument

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6d4d51f8f5a: [clang] Specify attribute syntax & spelling with a single argument (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D14

[PATCH] D148103: [clang] Allow attributes to be constructed from keyword tokens

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG265d87e46535: [clang] Allow attributes to be constructed from keyword tokens (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148103

[PATCH] D148104: [clang] Type safety tweak for AttributeCommonInfo::Form

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaec3f951bf36: [clang] Type safety tweak for AttributeCommonInfo::Form (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148104/new/

[PATCH] D148105: [clang] Fix FIXME in isAlignasAttribute()

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd41371be02f: [clang] Fix FIXME in isAlignasAttribute() (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148105/new/ https://review

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG053bdb77b0ce: [clang] Bump AS_GNU to 1 (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Hi @erichkeane and @aaron.ballman. Does the updated patch look OK? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 ___ cfe-commi

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 524843. rsandifo-arm added a comment. Add internals documentation. Add FIXME to temporary code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 Files: clang-t

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. In D148700#4364229 , @aaron.ballman wrote: > This basically LGTM, but we should add documentation to the internals manual > too: https://clang.llvm.org/docs/InternalsManual.htm

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 524846. rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Update onto current main. Only change is to replace C++2b with C++23. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1487

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-25 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks @aaron.ballman and @erichkeane for your patience in reviewing the patch and steering me in the right direction. What do you think about the other two patches in the series: - https://reviews.llvm.org/D148699 (comes before this one) - https://reviews.llvm.org

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-30 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 526600. rsandifo-arm added a comment. Avoid most uses of `<< 0`. Add comments to those that remain. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148702/new/ https://reviews.llvm.org/D148702 Files: cla

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-30 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:2902 S.Diag(AL.getRange().getBegin(), diag::err_attribute_wrong_decl_type) -<< AL << ExpectedTypeOrNamespace; +<< AL << 0 << Expecte

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 526936. rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Rebase to account for a diagnostic that has moved. No other changes from the previous version. I'll wait for the build results before pushing. Thanks for the review!

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 526944. rsandifo-arm added a comment. Update base commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148699/new/ https://reviews.llvm.org/D148699 Files: clang/include/clang/Basic/Attr.td Index: clan

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac5c996d5aaa: [clang] Mark keywords that have their own parsing rules (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148699/new/

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG301eb6b68f30: [clang] Add support for “regular” keyword attributes (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG33ee5c466346: [clang] Add Parse and Sema support for RegularKeyword attributes (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1487

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang-tools-extra/pseudo/lib/grammar/CMakeLists.txt:5 -# Dependencies should be minimal to avoid long dep paths in the build graph. -# It does use clangBasic headers (tok::TokenKind), but linking is not needed. -# We have no transit

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-08 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. In D148700#4280833 , @erichkeane wrote: > Generally ok with all of this, but want some time to think about it/give > aaron/etc time to see it. Hi @erichkeane & @aaron.ballman

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-10 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a subscriber: sdesmalen. rsandifo-arm added a comment. Thanks for the review. Comment at: clang/include/clang/Basic/Attr.td:2427-2430 +def ArmStreaming : TypeAttr, TargetSpecificAttr { + let Spellings = [RegularKeyword<"__arm_streaming">]; + let Documentati

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Hi @aaron.ballman and @erichkeane . Do you have any more thoughts on this? In principle, I'm happy to convert an existing attribute over to the new scheme, but in practice, I can't find one that seems to be suitable. If we're going to do that, I think I'll need

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 522703. rsandifo-arm added a comment. Add documentation. Fix a comment cut-&-pasto that Aaron pointed out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 Files

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Thanks @erichkeane . Adding the documentation with that kind of disclaimer sounds good to me. I've done that in the updated version, and also fixed the comment problem that Aaron pointed out. Repository: rG LLVM G

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch retroactively classified all existing keyword

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added subscribers: kristof.beyls, dschuff. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added projects: clang, c

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added subscribers: jdoerfert, kristof.beyls, dschuff. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a proje

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. See https://reviews.llvm.org/D139028 for previous discussion on this topic. https://reviews.llvm.org/D148700 contains the Attr.td support (and the main rationale) while https://reviews.llvm.org/D148702 contains the main Parse & Sema support. Repository: rG LLV

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Thanks for the reviews! In D148702#4280392 , @erichkeane wrote: > So I don't mind the changes in this stack, though this doing a little bit of > a 'backdoor' way of getting th

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 514993. rsandifo-arm added a comment. Make AttrTokenKinds.inc use a new KEYWORD_ATTRIBUTE macro, rather than using KEYWORD directly. Move the #undef to the .inc file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:106 +#include "clang/Basic/AttrTokenKinds.inc" +#undef KEYWORD + ); erichkeane wrote: > Does AttrTokenKinds.inc not do this unde

<    1   2   3   >