Skip to content

crash with 'using enum' in combination with bitwise OR and brackets #58057

Closed
@benjymous

Description

@benjymous

The following snippet causes llvm to crash:

struct Wrap {
enum Things {
    Value1,
    Value2
};
};

using enum Wrap::Things;

int main() {
    int i = ( Value1 | Value2 );
}

Removing the brackets

    int i = Value1 | Value2;

is a workaround

It appears to be related to #54746

original source, preprocessed file, run script, and stdout log attached:
llvm_crash.zip

godbolt link:
https://godbolt.org/z/8qjjajPn9

Metadata

Metadata

Assignees

Labels

c++20clang:frontendLanguage frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions