[clang] [clang][sema] Remove unused local SourceLocation (PR #151455)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 30 22:54:42 PDT 2025
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/151455
getIntegerConstantExpr() doesn't force us to pass one, so don't.
>From b17b17be089708f851c8aa2c643b9969a041a064 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Thu, 31 Jul 2025 07:53:22 +0200
Subject: [PATCH] [clang][sema] Remove unused local SourceLocation
getIntegerConstantExpr() doesn't force us to pass one, so don't.
---
clang/lib/Sema/SemaChecking.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index c74b67106ad74..bc87611e1f846 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -15893,9 +15893,7 @@ ExprResult Sema::BuiltinMatrixTranspose(CallExpr *TheCall,
// Get and verify the matrix dimensions.
static std::optional<unsigned>
getAndVerifyMatrixDimension(Expr *Expr, StringRef Name, Sema &S) {
- SourceLocation ErrorPos;
- std::optional<llvm::APSInt> Value =
- Expr->getIntegerConstantExpr(S.Context, &ErrorPos);
+ std::optional<llvm::APSInt> Value = Expr->getIntegerConstantExpr(S.Context);
if (!Value) {
S.Diag(Expr->getBeginLoc(), diag::err_builtin_matrix_scalar_unsigned_arg)
<< Name;
More information about the cfe-commits
mailing list