wyt added inline comments.

================
Comment at: clang/unittests/Analysis/FlowSensitive/TransferTest.cpp:652
                        ASTContext &ASTCtx) {
-    ASSERT_THAT(Results, ElementsAre(Pair("p4", _), Pair("p3", _),
-                                     Pair("p2", _), Pair("p1", _)));
+    ASSERT_THAT(Results, ElementsAre(Pair("p1", _), Pair("p2", _),
+                                     Pair("p3", _), Pair("p4", _)));
----------------
ymandel wrote:
> Given that its now a map, should we use `UnorderedElementsAre`? Or, does 
> `StringMap` guarantee ordering?
`StringMap` is not yet exposed to the tests in this patch.

Some ordering is currently required to correctly retrieve the states in the 
tests. Hence, the conversion from `StringMap` to `vector<pair<string, StateT>>` 
(in deprecated `checkDataflow`) orders the elements alphabetically on the 
annotations.

Future refactoring will expose `StringMap` in the tests, where we will then not 
need to maintain an ordering since we can retrieve elements by keys, we can 
then use `UnorderedElementsAre`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132763/new/

https://reviews.llvm.org/D132763

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to