[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 01:40:32 PDT 2017


krasimir added a comment.

Thank you! A test would be nice.



================
Comment at: lib/Format/UnwrappedLineParser.cpp:432
   size_t OpeningLineIndex =
-      Lines.empty() ? (UnwrappedLine::kInvalidIndex) : (Lines.size() - 1);
+      CurrentLines->empty() ? (UnwrappedLine::kInvalidIndex) : (CurrentLines->size() - 1);  //////Lines does not account for 'nested' lines
 
----------------
Could you please reformat and use '//'-style comments?


https://reviews.llvm.org/D32524





More information about the cfe-commits mailing list