From: Davide Italiano Date: Sun, 19 Jul 2015 22:07:14 +0000 (+0000) Subject: [Sema] Make an assertion stricter. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=90b02d5f5fa2a0aaa793577aff528d7b8207d932;p=clang [Sema] Make an assertion stricter. We now check for the exact range of IdealIndex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@242652 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index c28b9ce329..f20ece5600 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -4138,7 +4138,7 @@ static void DiagnoseBaseOrMemInitializerOrder( if (InitKey == IdealInitKeys[IdealIndex]) break; - assert(IdealIndex != NumIdealInits && + assert(IdealIndex >= 0 && IdealIndex < NumIdealInits && "initializer not found in initializer list"); }