[clang-tools-extra] Initialize value. (PR #122339)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 10:59:52 PST 2025


https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/122339

None

>From d8268afeafb61f95f1fa917ab26214e84372eba3 Mon Sep 17 00:00:00 2001
From: Zahira Ammarguellat <zahira.ammarguellat at intel.com>
Date: Thu, 9 Jan 2025 10:58:29 -0800
Subject: [PATCH] Initialize value.

---
 .../clang-tidy/modernize/UseIntegerSignComparisonCheck.cpp      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang-tools-extra/clang-tidy/modernize/UseIntegerSignComparisonCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseIntegerSignComparisonCheck.cpp
index 8f807bc0a96d56..8e90e17d3aeafe 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseIntegerSignComparisonCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseIntegerSignComparisonCheck.cpp
@@ -114,7 +114,7 @@ void UseIntegerSignComparisonCheck::check(
   assert(SignedCastExpression);
 
   // Ignore the match if we know that the signed int value is not negative.
-  Expr::EvalResult EVResult;
+  Expr::EvalResult EVResult = Expr::EvalResult();
   if (!SignedCastExpression->isValueDependent() &&
       SignedCastExpression->getSubExpr()->EvaluateAsInt(EVResult,
                                                         *Result.Context)) {



More information about the cfe-commits mailing list