add "return" to the compound literal exclusions (#1113)

inhibits readability/brace warning for compound literals in return
statement
This commit is contained in:
Alexey Porotnikov
2018-01-22 20:43:41 +02:00
committed by Andrew Pardoe
parent 999f9dd0ce
commit 9de66ec027

View File

@@ -4091,6 +4091,7 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error):
(func and not Search(r'\boperator\s*\[\s*\]', func.group(1))) or (func and not Search(r'\boperator\s*\[\s*\]', func.group(1))) or
Search(r'\b(?:struct|union)\s+alignas\s*$', line_prefix) or Search(r'\b(?:struct|union)\s+alignas\s*$', line_prefix) or
Search(r'\bdecltype$', line_prefix) or Search(r'\bdecltype$', line_prefix) or
Search(r'\breturn\s*$', line_prefix) or
Search(r'\s+=\s*$', line_prefix)): Search(r'\s+=\s*$', line_prefix)):
match = None match = None
if (match and if (match and