Skip to content

Commit 88f702e

Browse files
committed
Add assertion
1 parent ad033c9 commit 88f702e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/Sema/SemaInit.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4860,6 +4860,9 @@ static void TryListInitialization(Sema &S,
48604860
assert(
48614861
S.Context.hasSameUnqualifiedType(SubInit[0]->getType(), DestType) &&
48624862
"Deduced to other type?");
4863+
assert(Kind.getKind() == clang::InitializationKind::IK_DirectList &&
4864+
"List-initialize structured bindings but not "
4865+
"direct-list-initialization?");
48634866
TryArrayCopy(S,
48644867
InitializationKind::CreateDirect(Kind.getLocation(),
48654868
InitList->getLBraceLoc(),

0 commit comments

Comments
 (0)