https://github.com/dpaoliello updated 
https://github.com/llvm/llvm-project/pull/152809

>From 5377e6907af9cbfb339a49d0a37f590cdc8f3d17 Mon Sep 17 00:00:00 2001
From: Daniel Paoliello <dan...@microsoft.com>
Date: Fri, 8 Aug 2025 15:37:17 -0700
Subject: [PATCH] Fix MSVC warning in CompilerInvocation.cpp

---
 clang/lib/Frontend/CompilerInvocation.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Frontend/CompilerInvocation.cpp 
b/clang/lib/Frontend/CompilerInvocation.cpp
index ccc3154d20968..2ea3ed759ff42 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -4441,7 +4441,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, 
ArgList &Args,
 
     StringRef Ver = A->getValue();
     std::pair<StringRef, StringRef> VerParts = Ver.split('.');
-    unsigned Major, Minor = 0;
+    int Major, Minor = 0;
 
     // Check the version number is valid: either 3.x (0 <= x <= 9) or
     // y or y.0 (4 <= y <= current version).
@@ -4454,7 +4454,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, 
ArgList &Args,
              : VerParts.first.size() == Ver.size() || VerParts.second == "0")) 
{
       // Got a valid version number.
 #define ABI_VER_MAJOR_MINOR(Major_, Minor_)                                    
\
-  if (std::tie(Major, Minor) <= std::tuple(Major_, Minor_))                    
\
+  if (std::tuple(Major, Minor) <= std::tuple(Major_, Minor_))                  
\
     Opts.setClangABICompat(LangOptions::ClangABI::Ver##Major_##_##Minor_);     
\
   else
 #define ABI_VER_MAJOR(Major_)                                                  
\

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to