[llvm] [Demangle] Fix compilation on MSVC (PR #200562)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 30 03:44:26 PDT 2026
https://github.com/Fewnity created https://github.com/llvm/llvm-project/pull/200562
Fix uninitialized variable when using the MSVC v145 compiler on Visual Studio 2026
>From 35587b234d0115c2b2d53a7344c8b244fd08cb0f Mon Sep 17 00:00:00 2001
From: Fewnity <39272935+Fewnity at users.noreply.github.com>
Date: Sat, 30 May 2026 12:43:35 +0200
Subject: [PATCH] [Demangle] Fix compilation on MSVC
Fix uninitialized variable when using the MSVC v145 compiler on Visual Studio 2026
---
llvm/lib/Demangle/MicrosoftDemangle.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp
index 769dbd4f2eb6e..9d349242392ab 100644
--- a/llvm/lib/Demangle/MicrosoftDemangle.cpp
+++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp
@@ -2544,7 +2544,7 @@ char *llvm::microsoftDemangle(std::string_view MangledName, size_t *NMangled,
OF = OutputFlags(OF | OF_NoVariableType);
int InternalStatus = demangle_success;
- char *Buf;
+ char *Buf = nullptr;
if (D.Error)
InternalStatus = demangle_invalid_mangled_name;
else {
More information about the llvm-commits
mailing list