================ @@ -1580,13 +1570,21 @@ class UninitValsDiagReporter : public UninitVariablesHandler { // guaranteed to produce them in line/column order, this will provide // a stable ordering. llvm::sort(*vec, [](const UninitUse &a, const UninitUse &b) { + // Move ConstRef uses to the back. ---------------- zygoloid wrote:
Is this the best ordering? If we have a definitely-reached const ref use and a "may be uninitialised on some paths to here" use, it's really unclear to me which one we should report. Maybe reporting both makes sense? What do you think? https://github.com/llvm/llvm-project/pull/147898 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits