Index: cfe/trunk/lib/Sema/SemaDecl.cpp =================================================================== --- cfe/trunk/lib/Sema/SemaDecl.cpp +++ cfe/trunk/lib/Sema/SemaDecl.cpp @@ -4891,6 +4891,8 @@ static void FixInvalidVariablyModifiedTypeLoc(TypeLoc SrcTL, TypeLoc DstTL) { + SrcTL = SrcTL.getUnqualifiedLoc(); + DstTL = DstTL.getUnqualifiedLoc(); if (PointerTypeLoc SrcPTL = SrcTL.getAs()) { PointerTypeLoc DstPTL = DstTL.castAs(); FixInvalidVariablyModifiedTypeLoc(SrcPTL.getPointeeLoc(), Index: cfe/trunk/test/CXX/basic/basic.types/p10.cpp =================================================================== --- cfe/trunk/test/CXX/basic/basic.types/p10.cpp +++ cfe/trunk/test/CXX/basic/basic.types/p10.cpp @@ -139,3 +139,5 @@ constexpr int arb(int n) { int a[n]; // expected-error {{variable of non-literal type 'int [n]' cannot be defined in a constexpr function}} } +constexpr long Overflow[ // expected-error {{constexpr variable cannot have non-literal type 'long const[(1 << 30) << 2]'}} + (1 << 30) << 2]{}; // expected-warning {{requires 34 bits to represent}}