ahatanak added a comment. I see `assert(DC && "This decl is not contained in a translation unit!");` fail in `Decl::getTranslationUnitDecl` when `DeclRefExpr` is constructed. That's because the `ImplicitParamDecl` passed to `DeclRefExpr`'s constructor doesn't have a decl context if I delete `FD`. So it looks like `FD` is needed in these cases.
================ Comment at: clang/lib/CodeGen/CGObjC.cpp:3702 + /*DefArg=*/nullptr); + args.push_back(Params[0] = DstDecl); + ParmVarDecl *SrcDecl = ParmVarDecl::Create( ---------------- aprantl wrote: > Does this compile without warnings? Yes, clang compiles this without any warnings. I don't know whether other compilers warn. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104883/new/ https://reviews.llvm.org/D104883 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits