forked from OSchip/llvm-project
Delete dead code. (Array element types are always complete in C.)
llvm-svn: 184332
This commit is contained in:
parent
f226e97dff
commit
00dfec6265
|
@ -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<
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue