]> granicus.if.org Git - clang/commitdiff
When a field is variable-sized or is an array with a negative size,
authorDouglas Gregor <dgregor@apple.com>
Mon, 20 Jul 2009 18:55:14 +0000 (18:55 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 20 Jul 2009 18:55:14 +0000 (18:55 +0000)
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

lib/Sema/SemaDecl.cpp

index d1d06e3284826696b07379826c48971117f6616b..2d7d469098c387d7c9cb5547f97445ff93e73bff 100644 (file)
@@ -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;
     }
   }