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!
This commit is contained in:
Nicolas Hillegeer 2014-05-18 11:21:32 +02:00 committed by Thiago de Arruda
parent 96a9b5eaee
commit b591447f77

View File

@ -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: