Roelio81 added a comment. Herald added a project: All. This change also has impact which was undesired on our code base as it now considers all attributes to be "bound" to the if-expression rather than to the if-body. For example, we had this in our code base
if (condition) [[maybe_unused]] auto result = x->setValue(0.0); This became the following after upgrading from clang 10: if (condition) [[maybe_unused]] auto result = x->setValue(0.0); The [[maybe_unused]] is actually referring to the result variable, hence I think it makes more sense to have it on the second line. We worked around the issue by adding curly braces, i.e., if (condition) { [[maybe_unused]] auto result = x->setValue(0.0); } Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80144/new/ https://reviews.llvm.org/D80144 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits