Extend lvalue evaluation in ExprConstant.cpp to handle CK_LValueBitCast (which is completely trivial).  PR8836.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141604 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/i-c-e-cxx.cpp b/test/SemaCXX/i-c-e-cxx.cpp
index 4ebdada..4d02ca8 100644
--- a/test/SemaCXX/i-c-e-cxx.cpp
+++ b/test/SemaCXX/i-c-e-cxx.cpp
@@ -57,3 +57,7 @@
 // PR11040
 const int x = 10;
 int* y = reinterpret_cast<const char&>(x); // expected-error {{cannot initialize}}
+
+// This isn't an integral constant expression, but make sure it folds anyway.
+struct PR8836 { char _; long long a; };
+int PR8836test[(__typeof(sizeof(int)))&reinterpret_cast<const volatile char&>((((PR8836*)0)->a))];