================
@@ -1044,6 +1146,141 @@ static unsigned CheckResults(DiagnosticsEngine &Diags,
SourceManager &SourceMgr,
return NumProblems;
}
+// Checks that directives are lexically in the same order as the emitted
+// diagnostics. Assumes that:
+// - every directive matches exactly one diagnostic,
+// - there are no wildcards, and
+// - CheckResults returned 0 problems, i.e. every diagnostic
+// was matched by every directive without considering the order.
+static unsigned CheckResultsAreInOrder(DiagnosticsEngine &Diags,
+ SourceManager &SourceMgr,
+ const TextDiagnosticBuffer &Buffer,
+ const ExpectedData &ED) {
----------------
mizvekov wrote:
What I am saying is that missing / unordered notes can be checked earlier,
between the emission of two error or warnings diagnostics, because notes are
not produced in isolation like the other diagnostics.
https://github.com/llvm/llvm-project/pull/179835
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits