[clang] Fix MSVC warning in CompilerInvocation.cpp (PR #152809)

Daniel Paoliello via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 8 16:15:51 PDT 2025


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

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

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

diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index ccc3154d20968..14dfc01afc0bb 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -4454,7 +4454,8 @@ 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<unsigned, unsigned>(Major_, Minor_))                          \
     Opts.setClangABICompat(LangOptions::ClangABI::Ver##Major_##_##Minor_);     \
   else
 #define ABI_VER_MAJOR(Major_)                                                  \



More information about the cfe-commits mailing list