curdeius accepted this revision.
curdeius added a comment.
This revision is now accepted and ready to land.

LGTM with nits.



================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:766
+  assert(!Tokens.empty());
+  const auto *LastToken = Tokens.back().Tok;
+  assert(LastToken);
----------------
It might be a matter of taste but adding this variable makes the code harder to 
read to me.


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:777
+    SavedToken.Tok->copyFrom(*Token.Tok);
+    SavedToken.Children = std::move(Token.Children);
+  }
----------------
So the token's children are modified (moved)? Is it done so that children be 
not considered by the annotator?


================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:787
+
+  const int Length = LastToken->TotalLength;
+
----------------
Why not like this?


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

https://reviews.llvm.org/D125137

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

Reply via email to