[clang] [Clang] Diagnose UB and emit error when identifier has both internal and external linkage (PR #192116)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 06:44:26 PDT 2026
================
@@ -4800,6 +4800,23 @@ void Sema::MergeVarDecl(VarDecl *New, LookupResult &Previous) {
return New->setInvalidDecl();
}
}
+
+ // C11 6.2.2p7:
----------------
AaronBallman wrote:
You should cite C2y (from the latest working draft: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3854.pdf) and then mention this was UB in earlier modes.
https://github.com/llvm/llvm-project/pull/192116
More information about the cfe-commits
mailing list