not safely derived. Don't allow lvalue-to-rvalue conversions on the result of
dereferencing such a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144783
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Info.Ctx.getTypeSize(DestType) != Info.Ctx.getTypeSize(SrcType))
return false;
+ LV.Designator.setInvalid();
LV.moveInto(Result);
return true;
}
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux %s
#define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];});
int x;
int literalVsNull1 = "foo" == 0;
int literalVsNull2 = 0 == "foo";
+
+// PR11385.
+int castViaInt[*(int*)(unsigned long)"test"]; // expected-error {{variable length array}}