================
Comment at: lib/Sema/SemaType.cpp:1564-1567
@@ -1555,2 +1563,6 @@
           << ArraySize->getSourceRange();
+        // Set array size to largest allowable size.
+        getMaxArraySize(Context, T, ConstantArrayType::getMaxSizeBits(Context),
+                        ConstVal);
+      }
     }
----------------
Richard Smith wrote:
> How about just returning QualType() here? An invalid type should do a better 
> job of suppressing follow-on diagnostics than an array-of-unexpected-size.
Returning QualType() also would prevent the crash, however it also causes a new 
error to be emitted.  "initializer element is not a compile-time constant" on 
__builtin_offsetof(struct Chunk2, data).


http://llvm-reviews.chandlerc.com/D800
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to