diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-22 02:10:53 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-22 02:10:53 +0000 |
commit | a91eb541a6adf81acf872e7315bc6b814c3241eb (patch) | |
tree | 76d9ae493becccfa037a7ac4fb0145dedd0d722b /lib/Sema/SemaInit.cpp | |
parent | 4971ff8eea7800bd2a73652add6dcf7a4adf5f74 (diff) |
Switch file-scope assignment initialization over to InitializationSequence.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 3ff2588356..c7a2769c44 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3201,8 +3201,12 @@ InitializationSequence::Perform(Sema &S, return S.Owned((Expr *)0); QualType DestType = Entity.getType().getType().getNonReferenceType(); + // FIXME: Ugly hack around the fact that Entity.getType().getType() is not + // the same as Entity.getDecl()->getType() in cases involving type merging, + // and we want latter when it makes sense. if (ResultType) - *ResultType = Entity.getType().getType(); + *ResultType = Entity.getDecl() ? Entity.getDecl()->getType() : + Entity.getType().getType(); Sema::OwningExprResult CurInit = S.Owned((Expr *)0); |