allow lambda function syntax in cpplint

Summary: as title

Test Plan: arc lint

Reviewers: kailiu

Reviewed By: kailiu

CC: leveldb

Differential Revision: https://reviews.facebook.net/D16251
This commit is contained in:
Lei Jin 2014-02-20 12:47:05 -08:00
parent 15ac5ad1f6
commit d45d17b2a3

View File

@ -3104,6 +3104,11 @@ def CheckBraces(filename, clean_lines, linenum, error):
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
Search(r'\s+=\s*$', line_prefix)):
match = None
# Whitelist lambda function definition which also requires a ";" after
# closing brace
if match:
if Match(r'^.*\[.*\]\s*(.*\)\s*)\{', line):
match = None
else:
# Try matching cases 2-3.