diff options
author | Richard Smith <richard@metafoo.co.uk> | 2020-07-15 11:33:07 -0700 |
---|---|---|
committer | Richard Smith <richard@metafoo.co.uk> | 2020-07-15 11:35:05 -0700 |
commit | d256b8ad5f2898cd05faa7319e00ea4a86b0cb47 (patch) | |
tree | 7ee681cd768051024b6127ad109c71b315cefd58 | |
parent | 0e377e253c16d82a60e73ae21ca6b902e7a78775 (diff) | |
download | llvm-d256b8ad5f2898cd05faa7319e00ea4a86b0cb47.zip llvm-d256b8ad5f2898cd05faa7319e00ea4a86b0cb47.tar.gz llvm-d256b8ad5f2898cd05faa7319e00ea4a86b0cb47.tar.bz2 |
Fix "unused variable" warning from recent GCC.
(cherry picked from commit 268025e2636c023fc39eed80cc4589f7ce9db786)
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index d20c238..41a4ae4 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. |