diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-22 15:35:07 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-22 15:35:07 +0000 |
commit | d6542d8efcf8389c3aab764f9e29ac284e16eda6 (patch) | |
tree | 4d383f402c5436bc5a23ed146ab9c75d2a233fcb /lib/Sema/SemaExpr.cpp | |
parent | bdc601b196c48d4cd56a5ceb45d41ae4e87371ab (diff) |
Switch InitializedEntity from TypeLoc down to just QualTypes, since we don't use the location information but we did spend a bunch of time building faked-up TypeLocs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 718d5ab577..d01516c77f 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3465,10 +3465,7 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty, SourceLocation RParenLoc, ExprArg InitExpr) { assert((Ty != 0) && "ActOnCompoundLiteral(): missing type"); - TypeSourceInfo *TInfo = 0; - QualType literalType = GetTypeFromParser(Ty, &TInfo); - if (!TInfo) - TInfo = Context.getTrivialTypeSourceInfo(literalType, LParenLoc); + QualType literalType = GetTypeFromParser(Ty); // FIXME: put back this assert when initializers are worked out. //assert((InitExpr != 0) && "ActOnCompoundLiteral(): missing expression"); @@ -3486,7 +3483,7 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty, return ExprError(); InitializedEntity Entity - = InitializedEntity::InitializeTemporary(TInfo->getTypeLoc()); + = InitializedEntity::InitializeTemporary(literalType); InitializationKind Kind = InitializationKind::CreateCast(SourceRange(LParenLoc, RParenLoc), /*IsCStyleCast=*/true); |