[cfe-commits] r76454 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Douglas Gregor dgregor at apple.com
Mon Jul 20 11:55:14 PDT 2009


Author: dgregor
Date: Mon Jul 20 13:55:14 2009
New Revision: 76454

URL: http://llvm.org/viewvc/llvm-project?rev=76454&view=rev
Log:
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!

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=76454&r1=76453&r2=76454&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Mon Jul 20 13:55:14 2009
@@ -4011,7 +4011,6 @@
         Diag(Loc, diag::err_typecheck_negative_array_size);
       else
         Diag(Loc, diag::err_typecheck_field_variable_size);
-      T = Context.IntTy;
       InvalidDecl = true;
     }
   }





More information about the cfe-commits mailing list