diff options
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 94d8f62ba6d..05136b882bd 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6226,10 +6226,8 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, // completed by the initializer. For example: // int ary[] = { 1, 3, 5 }; // "ary" transitions from an IncompleteArrayType to a ConstantArrayType. - if (!VDecl->isInvalidDecl() && (DclT != SavT)) { + if (!VDecl->isInvalidDecl() && (DclT != SavT)) VDecl->setType(DclT); - Init->setType(DclT.getNonReferenceType()); - } // Check any implicit conversions within the expression. CheckImplicitConversions(Init, VDecl->getLocation()); |