diff options
author | John McCall <rjmccall@apple.com> | 2010-10-08 02:01:28 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-08 02:01:28 +0000 |
commit | b4eb64d8426c0eaa58d398961e0e74ff85063d7c (patch) | |
tree | 92661fe6b3f4a26a332faf5be9a3d4c251b107ec /lib/Sema/SemaDecl.cpp | |
parent | 9a2b9d794bdf349b517ff799170f4409f45d147c (diff) |
Track the location of the context requiring an implicit conversion and use it
to white-list conversions required by system headers. rdar://problem/8232669
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116029 91177308-0d34-0410-b5e6-96231b3b80d8
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); |