aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-04-10 20:43:46 +0000
committerDouglas Gregor <dgregor@apple.com>2012-04-10 20:43:46 +0000
commit69a30b838c723cb1850de55cfa48a402cfeeb6e0 (patch)
tree9862f828934ae9c63773d3a3e57963327ada10bf /lib/Sema/SemaInit.cpp
parentabf65ce5ddfb8db0d34280d30a91253930732f4f (diff)
When we determine that an initialization sequence failed due to an
incomplete type, keep track of the actual type that was incomplete. Otherwise, we might fail to produce a diagnostic. Fixes PR12498. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index ee051428da..a65b41fd1c 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -2877,7 +2877,7 @@ static void TryConstructorInitialization(Sema &S,
// The type we're constructing needs to be complete.
if (S.RequireCompleteType(Kind.getLocation(), DestType, 0)) {
- Sequence.SetFailed(InitializationSequence::FK_Incomplete);
+ Sequence.setIncompleteTypeFailure(DestType);
return;
}
@@ -3109,7 +3109,7 @@ static void TryListInitialization(Sema &S,
}
if (DestType->isRecordType()) {
if (S.RequireCompleteType(InitList->getLocStart(), DestType, S.PDiag())) {
- Sequence.SetFailed(InitializationSequence::FK_Incomplete);
+ Sequence.setIncompleteTypeFailure(DestType);
return;
}
@@ -5687,7 +5687,7 @@ bool InitializationSequence::Diagnose(Sema &S,
break;
case FK_Incomplete:
- S.RequireCompleteType(Kind.getLocation(), DestType,
+ S.RequireCompleteType(Kind.getLocation(), FailedIncompleteType,
diag::err_init_incomplete_type);
break;