diff --git a/cpplint/cpplint.py b/cpplint/cpplint.py index ccc25d4..23c7ed2 100755 --- a/cpplint/cpplint.py +++ b/cpplint/cpplint.py @@ -4459,6 +4459,9 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, 'Lines should be <= %i characters long' % _line_length) if (cleansed_line.count(';') > 1 and + # allow simple single line lambdas + not Match(r'^[^{};]*\[[^\[\]]*\][^{}]*\{[^{}\n\r]*\}', + line) and # for loops are allowed two ;'s (and may run over two lines). cleansed_line.find('for') == -1 and (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or