nick added a comment. > I feel like doing interprocedural analysis for this is overkill. What is the > benefit of boost::ignore_unused(foo); rather than the more common (void) > foo;? Any examples?
> I haven't seen boost::ignore_unused before. In my experience, the idiomatic > way of ignoring an unused variable in C/C++ is to cast it to void, as Arthur > said. This is a weak argument to have false positives, don't you agree? You may have not seen it, but it exists and is used: https://github.com/search?q=%22boost%3A%3Aignore_unused%22+NOT+%22Boost+Software+License%22&type=Code > The combination of having an uninitialized variable and explicitly marking it > unused like this seems to me like it would be unusual. It could be a variable used exclusively inside an `assert` or some other conditionally no-op macro-function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79895/new/ https://reviews.llvm.org/D79895 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits