krasimir added a comment.

Great patch!



================
Comment at: lib/Format/AffectedRangeManager.cpp:144
+      Line->First->is(tok::r_brace) &&
+      Line->MatchingOpeningBlockLineIndex != -1 &&
+      Lines[Line->MatchingOpeningBlockLineIndex]->Affected;
----------------
nit: replace `-1` with `UnwrappedLine::kInvalidIndex`


================
Comment at: lib/Format/UnwrappedLineParser.h:58
+
+  /// \brief The corresponding closing line to MatchingOpeningBlockLineIndex.
+  size_t MatchingClosingBlockLineIndex = kInvalidIndex;
----------------
This comment could be improved. I interpret it as: start with the line at 
`MatchingOpeningBlockLineIndex`, and store the closing block line index of it, 
which will result in just the index of the current line being stored here if it 
closes a block.


Repository:
  rC Clang

https://reviews.llvm.org/D45726



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

Reply via email to