yonghong-song added inline comments.
================ Comment at: clang/lib/CodeGen/CGExpr.cpp:2844 + auto *Fn = + dyn_cast<llvm::Function>(LV.getPointer(*this)->stripPointerCasts()); + if (DI && !Fn->getSubprogram()) ---------------- dblaikie wrote: > Oh, please change this to cast, rather than dyn_cast before committing. > (since the Fn is unconditionally dereferenced on the next line (well, > conditional on DI, but that's not relevant to this) > > Could also move the "if (DI)" further out, like this: > ``` > if (CGDebugInfo *DI = ...) { > auto *Fn = cast... > if (!Fn->getSubprogram()) > DI->EmitFunctionDecl(...); > } > ``` done as suggested! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100567/new/ https://reviews.llvm.org/D100567 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits