summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-20 18:55:14 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-20 18:55:14 +0000
commit959cc7aaaafb8402c185ed32dce7b82dae0c435b (patch)
tree6533cec1e8275e82aecb586f92243274539db0ec /clang/lib/Sema/SemaDecl.cpp
parent3c2a893ac71f258ae3def83b217f15af16548d14 (diff)
downloadbcm5719-llvm-959cc7aaaafb8402c185ed32dce7b82dae0c435b.tar.gz
bcm5719-llvm-959cc7aaaafb8402c185ed32dce7b82dae0c435b.zip
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! llvm-svn: 76454
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index d1d06e32848..2d7d469098c 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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;
}
}
OpenPOWER on IntegriCloud