================ @@ -3206,9 +3206,11 @@ ExprResult SemaObjC::BuildInstanceMessage( } if (!isDesignatedInitChain) { const ObjCMethodDecl *InitMethod = nullptr; + auto *CurMD = SemaRef.getCurMethodDecl(); + if (!CurMD) + return ExprResult((Expr *)nullptr); ---------------- smanna12 wrote:
Thank you @tahonermann for review and feedback. I have added an assert. https://github.com/llvm/llvm-project/pull/97220 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits