Closed as not planned
Description
A weird error and a crash
struct X
{
enum Masks {Mask = 1,Shift = 0};
};
void Foo (int a)
{
using enum X::Masks;
auto u = (Mask); // weird error
auto v = (Mask << Shift); // ICE
}
~/llvm/trunk/build/bin/clang++ -std=c++20 -c uenum.cc
uenum.cc:10:8: error: variable 'u' with type 'auto' has incompatible initializer of type '<overloaded function type>'
auto u = (Mask);
^ ~~~~~~
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/nathan/llvm/trunk/build/bin/clang++ -std=c++20 -c uenum.cc
1. uenum.cc:11:26: current parser token ')'
2. uenum.cc:7:1: parsing function body 'Foo'
3. uenum.cc:7:1: in compound statement ('{}')