Fix "unused variable" warning from recent GCC.

This commit is contained in:
Richard Smith 2020-07-15 11:33:07 -07:00
parent a3ad8f92b4
commit 268025e263
1 changed files with 1 additions and 2 deletions

View File

@ -9930,8 +9930,7 @@ namespace {
const ConstantArrayType *CAT =
Info.Ctx.getAsConstantArrayType(E->getType());
if (!CAT) {
if (const IncompleteArrayType *IAT =
Info.Ctx.getAsIncompleteArrayType(E->getType())) {
if (E->getType()->isIncompleteArrayType()) {
// We can be asked to zero-initialize a flexible array member; this
// is represented as an ImplicitValueInitExpr of incomplete array
// type. In this case, the array has zero elements.