Commit b591447f authored by Nicolas Hillegeer's avatar Nicolas Hillegeer Committed by Thiago de Arruda

clint: disregard compound literal return

This allows lines like:

return (my_struct_type) {
  .my_int = 5,
  .my_str = ""
};

Thanks to @watk for finding and fixing it!
parent 96a9b5ea
......@@ -2307,7 +2307,8 @@ def CheckBraces(filename, clean_lines, linenum, error):
'TEST', 'TEST_F', 'MATCHER', 'MATCHER_P', 'TYPED_TEST',
'EXCLUSIVE_LOCKS_REQUIRED', 'SHARED_LOCKS_REQUIRED',
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
Search(r'\s+=\s*$', line_prefix)):
Search(r'\s+=\s*$', line_prefix) or
Search(r'^\s*return\s*$', line_prefix)):
match = None
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment