[cfe-dev] Each StringLiteral in InitListExpr matched twice

Aaron Ballman via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 22 04:17:31 PDT 2021


On Wed, Sep 22, 2021 at 6:55 AM chiasa.men via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
>
> Example: https://godbolt.org/z/1hjzrv1d7
>
>
> There are 2 StringLiterals in an array.
>
> m stringLiteral()
>
> matches either twice (so produces 4 matches)
>
>
> Is that intended behaviour, if so, how to determine the second match?

That looks like a bug with AST traversal of the InitListExpr to me.
It's not specific to string literals, I can reproduce the behavior
with an initializer list using integers as well.

~Aaron

>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


More information about the cfe-dev mailing list