[clang] [clang][CodeGen] Diagnose deferred definitions with identical mangled names (PR #248930)

via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 5 08:56:04 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:

nvm the test failure came down to me not filtering inline definitions

https://github.com/llvm/llvm-project/pull/248930


More information about the cfe-commits mailing list