a non-dependent type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120384
91177308-0d34-0410-b5e6-
96231b3b80d8
return false;
}
+ // Make sure we determine the value kind before we bail out for
+ // dependent types.
+ VK = Expr::getValueKindForType(CastTy);
+
// If the type is dependent, we won't do any other semantic analysis now.
if (CastTy->isDependentType() || CastExpr->isTypeDependent()) {
Kind = CK_Dependent;
return false;
}
- VK = Expr::getValueKindForType(CastTy);
if (VK == VK_RValue && !CastTy->isRecordType())
DefaultFunctionArrayLvalueConversion(CastExpr);
&const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
}
}
+
+namespace test5 {
+ template <typename T> class chained_map {
+ int k;
+ void lookup() const {
+ int &v = (int &)k;
+ }
+ };
+}