[llvm-branch-commits] [CodeGen][CFI] Generalize transparent union in args of args of functions (PR #158194)
Peter Collingbourne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 12 13:58:29 PDT 2025
================
@@ -2360,12 +2363,19 @@ static QualType GeneralizeType(ASTContext &Ctx, QualType Ty,
bool GeneralizePointers) {
Ty = GeneralizeTransparentUnion(Ty);
- if (!GeneralizePointers || !Ty->isPointerType())
+ if (!Ty->isPointerType())
+ return Ty;
+
+ QualType PTy = Ty->getPointeeType();
+ if (PTy->getAs<FunctionProtoType>() || PTy->getAs<FunctionNoProtoType>())
----------------
pcc wrote:
The hook could also do the pointer generalization, no?
https://github.com/llvm/llvm-project/pull/158194
More information about the llvm-branch-commits
mailing list