srhines added a comment. In D77168#1953635 <https://reviews.llvm.org/D77168#1953635>, @jfb wrote:
> I'm not sure this is a good idea at all. We want to keep the codepath as > simple as possible to avoid introducing bugs. If a codebase sees a crash then > it's easier to bisect one function at a time than doing something like this. > I'd much rather see bisection using pragma to apply the `uninitialized` > attribute to multiple declarations. Certainly one function at a time is preferable, but that's not always possible. I do think that this would be a useful feature for making bisection easier, since automating the injection of `pragma`s into code seems a lot more challenging. Of course, the `pragma` approach is nice for other reasons (letting people carve out entire functions for initialized/uninitialized, but I think that is orthogonal to the debugging aspect. ================ Comment at: clang/lib/CodeGen/CGDecl.cpp:1814 + if (StopAfter) { + static unsigned Counter = 0; + if (Counter >= StopAfter) ---------------- MaskRay wrote: > I am a bit worried about the static variable. This makes CodeGen not reusable. The counter could exist in ASTContext instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77168/new/ https://reviews.llvm.org/D77168 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits