https://github.com/ingomueller-net created 
https://github.com/llvm/llvm-project/pull/169822

This PR suppresses a compiler warning, which turns into an error with 
`-Werror`, for a variable introduced in #169276 and only used in an assertion 
(which is, thus, unused if compiled without assertions).

From b386d2eb54b392ff399a4f4022132cf5dd4a15fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20M=C3=BCller?= <[email protected]>
Date: Thu, 27 Nov 2025 15:37:07 +0000
Subject: [PATCH] [clang:ast] Suppress warning for unused var without
 assertions.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This PR suppresses a compiler warning, which turns into an error with
`-Werror`, for a variable introduced in #169276 and only used in an
assertion (which is, thus, unused if compiled without assertions).

Signed-off-by: Ingo Müller <[email protected]>
---
 clang/lib/AST/ExprConstant.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 7b9380de6834d..431b58f4627bb 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -12181,6 +12181,7 @@ static bool evalShiftWithCount(
   QualType SourceTy = Call->getArg(0)->getType();
   QualType CountTy = Call->getArg(1)->getType();
   assert(SourceTy->isVectorType() && CountTy->isVectorType());
+  (void)CountTy;
 
   QualType DestEltTy = SourceTy->castAs<VectorType>()->getElementType();
   unsigned DestEltWidth = Source.getVectorElt(0).getInt().getBitWidth();

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to