diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 6cb2bcf512..025f696e09 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -4326,6 +4326,9 @@ void Sema::AddInitializerToDecl(Decl *RealDecl, Expr *Init, bool DirectInit) { Init->setType(DclT); } + // Check any implicit conversions within the expression. + CheckImplicitConversions(Init, VDecl->getLocation()); + Init = MaybeCreateCXXExprWithTemporaries(Init); // Attach the initializer to the decl. VDecl->setInit(Init); |