wyt added a comment.




================
Comment at: clang/lib/Analysis/FlowSensitive/DebugSupport.cpp:119-133
+    std::vector<std::pair<std::string, std::string>> LinesData;
+    for (auto &AtomAssignment : AtomAssignments) {
+      auto Name = getAtomName(AtomAssignment.first);
+      MaxNameLength = std::max(MaxNameLength, Name.size());
+      LinesData.push_back({Name, debugString(AtomAssignment.second)});
+    }
+    llvm::sort(LinesData.begin(), LinesData.end());
----------------
xazax.hun wrote:
> In its current form, I think you could create the final strings in one step 
> and sort those strings instead of the pairs. Or do we expect alignment to 
> mess up the order in that case?
> In its current form, I think you could create the final strings in one step 
> and sort those strings instead of the pairs. Or do we expect alignment to 
> mess up the order in that case?

Removed `LinesData` and the intermediate step of storing a pair of strings. 
There is still a loop at the start of the function to find the max name length 
for alignment purposes. 


================
Comment at: clang/unittests/Analysis/FlowSensitive/DebugSupportTest.cpp:230
+------------
+Unsatisfiable.
+
----------------
@xazax.hun 
> I don't see a test case for `Unsatisfiable` constraints.
Here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129548

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

Reply via email to