[clang] [SSAF] Let function parameters inherit linkage from their parent functions (PR #201946)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 8 13:03:15 PDT 2026


================
@@ -34,7 +34,7 @@ static EntityLinkageType getLinkageForDecl(const Decl *D) {
   //   to be assigned different EntityIDs. As a result, the behavior of the
   //   parameter across multiple TUs cannot be correlated.
   if (const auto *PVD = dyn_cast<ParmVarDecl>(D)) {
-    if (const auto *FD = llvm::dyn_cast<FunctionDecl>(
+    if (const auto *FD = llvm::dyn_cast_or_null<FunctionDecl>(
----------------
steakhal wrote:

Why did you change this back to `dyn_cast_or_null`?
A parameter decl always lives inside a function, right?

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


More information about the cfe-commits mailing list