diff options
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 403e8f60f5..ed5c431da8 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -253,8 +253,9 @@ void Sema::ActOnEndOfTranslationUnit() { VD->setInvalidDecl(); else { // Set the length of the array to 1 (C99 6.9.2p5). - llvm::APSInt One(Context.getTypeSize(Context.getSizeType()), - true); + Diag(VD->getLocation(), diag::warn_tentative_incomplete_array); + llvm::APInt One(Context.getTypeSize(Context.getSizeType()), + true); QualType T = Context.getConstantArrayType(ArrayT->getElementType(), One, ArrayType::Normal, 0); |