based on the known properties of the casted-to type. Fixes a crash on spirit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120180
91177308-0d34-0410-b5e6-
96231b3b80d8
<< Ex->getSourceRange();
ExprValueKind VK = VK_RValue;
+ if (TypeDependent)
+ VK = Expr::getValueKindForType(DestType);
+
switch (Kind) {
default: llvm_unreachable("Unknown C++ cast!");
template<typename OT> int myMethod()
{ return 2 && sizeof(OT); }
}
+
+namespace test4 {
+ template <typename T> T *addressof(T &v) {
+ return reinterpret_cast<T*>(
+ &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+ }
+}