inside a GNU statement expression.
rdar://
16064952
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201468
91177308-0d34-0410-b5e6-
96231b3b80d8
/// an object can indirectly refer to subobjects which were initialized earlier.
static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This,
const Expr *E, bool AllowNonLiteralTypes) {
+ if (E->isTypeDependent() || E->isValueDependent())
+ return false;
if (!AllowNonLiteralTypes && !CheckLiteralType(Info, E, &This))
return false;
// equivalent to "const int x = 42;" as per C++03 8.5/p13.
typedef A<i> Ai; // ok
}
+
+// rdar://16064952
+namespace rdar16064952 {
+ template < typename T > void fn1() {
+ T b;
+ unsigned w = ({int a = b.val[sizeof(0)]; 0; }); // expected-warning {{use of GNU statement expression extension}}
+ }
+}