[clang] bd2bdad - void cast to suppress -Wunused-variable in non-asserts build
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 11 17:52:50 PST 2021
Author: David Blaikie
Date: 2021-03-11T17:51:31-08:00
New Revision: bd2bdad19e5a3bf910da7c2d1936a7e18b47c084
URL: https://github.com/llvm/llvm-project/commit/bd2bdad19e5a3bf910da7c2d1936a7e18b47c084
DIFF: https://github.com/llvm/llvm-project/commit/bd2bdad19e5a3bf910da7c2d1936a7e18b47c084.diff
LOG: void cast to suppress -Wunused-variable in non-asserts build
Added:
Modified:
clang/lib/CodeGen/CGExprScalar.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 39e0d8d5608d..4774f92a2eed 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -3162,6 +3162,7 @@ Value *ScalarExprEmitter::EmitDiv(const BinOpInfo &Ops) {
// We need to check the types of the operands of the operator to get the
// correct matrix dimensions.
auto *BO = cast<BinaryOperator>(Ops.E);
+ (void)BO;
assert(
isa<ConstantMatrixType>(BO->getLHS()->getType().getCanonicalType()) &&
"first operand must be a matrix");
More information about the cfe-commits
mailing list