From: Douglas Gregor Date: Mon, 20 Jul 2009 18:55:14 +0000 (+0000) Subject: When a field is variable-sized or is an array with a negative size, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec820c6bc49aef01767b5810e765bba853909ef8;p=clang When a field is variable-sized or is an array with a negative size, don't replace the type of the field with 'int', from Enea Zaffanella! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76454 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d1d06e3284..2d7d469098 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -4011,7 +4011,6 @@ FieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, Diag(Loc, diag::err_typecheck_negative_array_size); else Diag(Loc, diag::err_typecheck_field_variable_size); - T = Context.IntTy; InvalidDecl = true; } }