ahatanak added a comment. I don't know know why these fake FunctionDecls are needed, but it looks like it's okay to avoid creating them. I see a few debug info tests failing if `GlobalDecl()` instead of a fake function is passed to `StartFunction`, but it looks like the test check strings should be changed.
AFAICT `CodeGenFunction::GenerateCopyHelperFunction` has been creating these fake FunctionDecls from the beginning and subsequent patches didn't fix it: https://github.com/llvm/llvm-project/commit/0c74327715af823930cb583490d315f64ef8de4e Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98799/new/ https://reviews.llvm.org/D98799 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits