[clang] [clang][CodeGen] Diagnose deferred definitions with identical mangled names (PR #248930)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 5 07:03:27 PST 2026
================
@@ -5040,6 +5040,29 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
}
}
+ // Diagnose distinct definitions with the same mangled name.
+ StringRef MangledName = getMangledName(GD);
+ auto [It, Inserted] = ClaimedDefinitions.try_emplace(MangledName, GD);
----------------
MaxBrandtner wrote:
I rebased it again on the fix for that issue. At least on my machine running check-all locally succeeded
https://github.com/llvm/llvm-project/pull/248930
More information about the cfe-commits
mailing list