Delete dead code. (Array element types are always complete in C.)

llvm-svn: 184332
This commit is contained in:
Eli Friedman 2013-06-19 19:03:14 +00:00
parent f226e97dff
commit 00dfec6265
2 changed files with 0 additions and 9 deletions

View File

@ -4313,8 +4313,6 @@ def ext_typecheck_decl_incomplete_type : ExtWarn<
InGroup<DiagGroup<"tentative-definition-incomplete-type">>;
def err_tentative_def_incomplete_type : Error<
"tentative definition has type %0 that is never completed">;
def err_tentative_def_incomplete_type_arr : Error<
"tentative definition has array of type %0 that is never completed">;
def warn_tentative_incomplete_array : Warning<
"tentative array definition assumed to have one element">;
def err_typecheck_incomplete_array_needs_initializer : Error<

View File

@ -681,13 +681,6 @@ void Sema::ActOnEndOfTranslationUnit() {
if (const IncompleteArrayType *ArrayT
= Context.getAsIncompleteArrayType(VD->getType())) {
if (RequireCompleteType(VD->getLocation(),
ArrayT->getElementType(),
diag::err_tentative_def_incomplete_type_arr)) {
VD->setInvalidDecl();
continue;
}
// Set the length of the array to 1 (C99 6.9.2p5).
Diag(VD->getLocation(), diag::warn_tentative_incomplete_array);
llvm::APInt One(Context.getTypeSize(Context.getSizeType()), true);