[PATCH] D94092: [Clang] Remove unnecessary Attr.isArgIdent checks.

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 09:01:30 PST 2021


fhahn added a comment.

In D94092#2479753 <https://reviews.llvm.org/D94092#2479753>, @erichkeane wrote:

>> I tried a few different things to construct matrix_type attributes with ArgIdents, but failed. The patch also adjusts the code for a bunch of attributes. So if there are indeed cases where ArgIdents can show up, we will get some examples for unit tests.
>
> The comment claims: "// Special case where the argument is a template id.".  I would expect one of the following to hit that:
> https://godbolt.org/z/znYW1s
>
>           

I tried this snippet with the patch (and also an added ` assert(!Attr.isArgIdent(0));` to `HandleVectorSizeAttr` just to be sure). Compiled as expected, no crash.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94092/new/

https://reviews.llvm.org/D94092



More information about the cfe-commits mailing list