Author: Richard Smith Date: 2020-07-15T11:35:05-07:00 New Revision: d256b8ad5f2898cd05faa7319e00ea4a86b0cb47
URL: https://github.com/llvm/llvm-project/commit/d256b8ad5f2898cd05faa7319e00ea4a86b0cb47 DIFF: https://github.com/llvm/llvm-project/commit/d256b8ad5f2898cd05faa7319e00ea4a86b0cb47.diff LOG: Fix "unused variable" warning from recent GCC. (cherry picked from commit 268025e2636c023fc39eed80cc4589f7ce9db786) Added: Modified: clang/lib/AST/ExprConstant.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index d20c2382b6ac..41a4ae4b91c8 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -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. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits