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:
parent
15ac5ad1f6
commit
d45d17b2a3
5
linters/cpp_linter/cpplint.py
vendored
5
linters/cpp_linter/cpplint.py
vendored
@ -3104,6 +3104,11 @@ def CheckBraces(filename, clean_lines, linenum, error):
|
|||||||
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
|
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
|
||||||
Search(r'\s+=\s*$', line_prefix)):
|
Search(r'\s+=\s*$', line_prefix)):
|
||||||
match = None
|
match = None
|
||||||
|
# Whitelist lambda function definition which also requires a ";" after
|
||||||
|
# closing brace
|
||||||
|
if match:
|
||||||
|
if Match(r'^.*\[.*\]\s*(.*\)\s*)\{', line):
|
||||||
|
match = None
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Try matching cases 2-3.
|
# Try matching cases 2-3.
|
||||||
|
Loading…
Reference in New Issue
Block a user