mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
add "return" to the compound literal exclusions
inhibits readability/brace warning for compound literals in return statement
This commit is contained in:
parent
9663cabfee
commit
84fb7c09af
1
cpplint/cpplint.py
vendored
1
cpplint/cpplint.py
vendored
|
@ -3945,6 +3945,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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user