[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > I kind of think "no enforcement for invalid input" is reasonable here. That > > would be consistent with things like the alias attribute where we accept a > > string that has to conform to ABI mangling rules (which could be a matter > > of poor QoI rather than

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-07 Thread Victor Chernyakin via cfe-commits
LocalSpook wrote: > I kind of think "no enforcement for invalid input" is reasonable here. That > would be consistent with things like the alias attribute where we accept a > string that has to conform to ABI mangling rules (which could be a matter of > poor QoI rather than precedent). If

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-07 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Second: We create a new `Argument` type in `Attr.td`, and the code-gen > > infrastructure for it that takes an "identifier surrounded by quotes" (sort > > of a mix between `IdentifierArgument` and `StringArgument`). This has the > > effect of using our 'normal' parsing

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Second: We create a new `Argument` type in `Attr.td`, and the code-gen > infrastructure for it that takes an "identifier surrounded by quotes" (sort > of a mix between `IdentifierArgument` and `StringArgument`). This has the > effect of using our 'normal' parsing rules

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. I think this is a case of 'cure is worse than the disease'. Unless this implements our 'identifier' rules, it is just going to reject valid code. Any sort of enforcement here on individual characters NEEDS to follow the

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-06 Thread Victor Chernyakin via cfe-commits
LocalSpook wrote: @erichkeane @AaronBallman https://github.com/llvm/llvm-project/pull/84272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-06 Thread Виктор Чернякин via cfe-commits
https://github.com/LocalSpook edited https://github.com/llvm/llvm-project/pull/84272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Виктор Чернякин (LocalSpook) Changes This PR adds checks to make sure the ABI tag given in `[[gnu::abi_tag("")]]` attribute is valid. Example errors: ```text stdin:1:16: error: ABI tag cannot be empty 1 | [[gnu::abi_tag("")]] void

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-06 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [clang] Validate ABI tag attributes (PR #84272)

2024-03-06 Thread Виктор Чернякин via cfe-commits
https://github.com/LocalSpook created https://github.com/llvm/llvm-project/pull/84272 This PR adds checks to make sure the ABI tag given in `[[gnu::abi_tag("")]]` attribute is valid. Example errors: ```text :1:16: error: ABI tag cannot be empty 1 | [[gnu::abi_tag("")]] void f(); |