https://github.com/aganea created https://github.com/llvm/llvm-project/pull/187939
This fixes: ``` [5804/7029] Building CXX object tools\clang\unittests\CMakeFiles\AllClangUnitTests.dir\Analysis\CFGBackEdgesTest.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(721): warning C4018: '>': signed/unsigned mismatch ... C:\git\llvm-project\clang\unittests\Analysis\CFGBackEdgesTest.cpp(170): note: see the first reference to 'testing::internal::PredicateFormatterFromMatcher<testing::internal::SizeIsMatcher<testing::internal::GtMatcher<int>>>::operator ()' in 'clang::analysis::`anonymous-namespace'::CFGBackEdgesTest_WhileWithContinueLoop_Test::TestBody' ``` >From e8a24370afcc18aba994b33c906e25e1c0b13601 Mon Sep 17 00:00:00 2001 From: Alexandre Ganea <[email protected]> Date: Sun, 22 Mar 2026 11:48:05 -0400 Subject: [PATCH] [clang] On Windows, silence warning in `CFGBackEdgesTest` with MSVC This fixes: ``` [5804/7029] Building CXX object tools\clang\unittests\CMakeFiles\AllClangUnitTests.dir\Analysis\CFGBackEdgesTest.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(721): warning C4018: '>': signed/unsigned mismatch ... C:\git\llvm-project\clang\unittests\Analysis\CFGBackEdgesTest.cpp(170): note: see the first reference to 'testing::internal::PredicateFormatterFromMatcher<testing::internal::SizeIsMatcher<testing::internal::GtMatcher<int>>>::operator ()' in 'clang::analysis::`anonymous-namespace'::CFGBackEdgesTest_WhileWithContinueLoop_Test::TestBody' ``` --- clang/unittests/Analysis/CFGBackEdgesTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/unittests/Analysis/CFGBackEdgesTest.cpp b/clang/unittests/Analysis/CFGBackEdgesTest.cpp index 1bf699c65ec81..a82dbc9a559d8 100644 --- a/clang/unittests/Analysis/CFGBackEdgesTest.cpp +++ b/clang/unittests/Analysis/CFGBackEdgesTest.cpp @@ -167,7 +167,7 @@ TEST(CFGBackEdgesTest, WhileWithContinueLoop) { ASSERT_THAT(Cfg, NotNull()); auto BackEdges = findCFGBackEdges(*Cfg); - EXPECT_THAT(BackEdges, SizeIs(testing::Gt(0))); + EXPECT_THAT(BackEdges, SizeIs(testing::Gt(0u))); for (const auto &[From, To] : BackEdges) EXPECT_THAT(From->getLoopTarget(), NotNull()); } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
