This revision was automatically updated to reflect the committed changes. Closed by commit rL303353: [clang-format] Fix MatchingOpeningBlockLineIndex computation (authored by krasimir).
Changed prior to commit: https://reviews.llvm.org/D32524?vs=99136&id=99442#toc Repository: rL LLVM https://reviews.llvm.org/D32524 Files: cfe/trunk/lib/Format/UnwrappedLineParser.cpp Index: cfe/trunk/lib/Format/UnwrappedLineParser.cpp =================================================================== --- cfe/trunk/lib/Format/UnwrappedLineParser.cpp +++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp @@ -429,8 +429,9 @@ parseParens(); addUnwrappedLine(); - size_t OpeningLineIndex = - Lines.empty() ? (UnwrappedLine::kInvalidIndex) : (Lines.size() - 1); + size_t OpeningLineIndex = CurrentLines->empty() + ? (UnwrappedLine::kInvalidIndex) + : (CurrentLines->size() - 1); ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack, MustBeDeclaration);
Index: cfe/trunk/lib/Format/UnwrappedLineParser.cpp =================================================================== --- cfe/trunk/lib/Format/UnwrappedLineParser.cpp +++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp @@ -429,8 +429,9 @@ parseParens(); addUnwrappedLine(); - size_t OpeningLineIndex = - Lines.empty() ? (UnwrappedLine::kInvalidIndex) : (Lines.size() - 1); + size_t OpeningLineIndex = CurrentLines->empty() + ? (UnwrappedLine::kInvalidIndex) + : (CurrentLines->size() - 1); ScopedDeclarationState DeclarationState(*Line, DeclarationScopeStack, MustBeDeclaration);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits