[clang] 7f5655c - [clang][sema] Remove unused local SourceLocation (#151455)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 31 04:53:05 PDT 2025


Author: Timm Baeder
Date: 2025-07-31T13:53:02+02:00
New Revision: 7f5655c50793444b1c3ce3ecea332efc03b9b323

URL: https://github.com/llvm/llvm-project/commit/7f5655c50793444b1c3ce3ecea332efc03b9b323
DIFF: https://github.com/llvm/llvm-project/commit/7f5655c50793444b1c3ce3ecea332efc03b9b323.diff

LOG: [clang][sema] Remove unused local SourceLocation (#151455)

getIntegerConstantExpr() doesn't force us to pass one, so don't.

Added: 
    

Modified: 
    clang/lib/Sema/SemaChecking.cpp

Removed: 
    


################################################################################
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