Skip to content

-Wvla warning twice for VM type at sizeof  #59570

Open
@Origami404

Description

Reproduce code:

int func(int n) {
    return sizeof(int [n]);
}

godbolt here.

Clang issue a VLA usage twice instead of once.

I am currently working on VLA and VM type checking in clang and I am going to solve this bug by myself. I guess this may be caused by evaling runtime sizeof expressions required to call Sema::BuildArrayType twice.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions