Patch by Axel Naumann!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274859
91177308-0d34-0410-b5e6-
96231b3b80d8
BaseType = VTy->getElementType();
else if (const ReferenceType *RTy = BaseType->getAs<ReferenceType>())
BaseType = RTy->getPointeeType();
+ else if (const AutoType *ATy = BaseType->getAs<AutoType>())
+ BaseType = ATy->getDeducedType();
else
llvm_unreachable("Unknown declarator!");
}
using T::operator-;
};
}
+
+namespace dont_crash {
+struct T { enum E {X = 12ll }; };
+struct S {
+ struct { int I; } ADecl;
+ static const auto Y = T::X;
+};
+//CHECK: static const auto Y = T::X;
+}