[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

Morris Hafner via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 26 11:05:13 PDT 2025


================
@@ -1366,8 +1366,7 @@ mlir::Value ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(
   const mlir::Location loc = cgf.getLoc(e->getSourceRange());
   if (auto kind = e->getKind();
       kind == UETT_SizeOf || kind == UETT_DataSizeOf) {
-    if (const VariableArrayType *variableArrTy =
-            cgf.getContext().getAsVariableArrayType(typeToSize)) {
+    if (cgf.getContext().getAsVariableArrayType(typeToSize)) {
----------------
mmha wrote:

Same here.

https://github.com/llvm/llvm-project/pull/133134


More information about the cfe-commits mailing list