================
@@ -1044,6 +1145,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) {
+ // Building a set of all directives ordered by their location
----------------
AaronBallman wrote:
```suggestion
// Building a set of all directives ordered by their location.
```
Look, I'm more useful than copilot!
https://github.com/llvm/llvm-project/pull/179835
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits