johannes added inline comments.

================
Comment at: tools/clang-diff/ClangDiff.cpp:319
+           "A Binary operator is supposed to have two arguments.");
+    for (int I : {1, 0, 2})
+      Offset = printHtmlForNode(OS, Diff, Tree, IsLeft, Children[I], Offset);
----------------
arphaman wrote:
> Please add a short comment that describes why this out-of-order traversal is 
> required
Should we do this in LexicallyOrderedRecursiveASTVisitor?

There are some other cases with CXXOperatorCallExpr where the order needs to be 
changed, e.g. postfix operators, operator->, operator() and operator[].
It can be done by sorting by SourceLocation of the first two elements, as the 
operator is always the first one.


https://reviews.llvm.org/D37004



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

Reply via email to