Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9de66ec

Browse files
alpoAndrewPardoe
authored andcommitted
add "return" to the compound literal exclusions (isocpp#1113)
inhibits readability/brace warning for compound literals in return statement
1 parent 999f9dd commit 9de66ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/python/cpplint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4091,6 +4091,7 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error):
40914091
(func and not Search(r'\boperator\s*\[\s*\]', func.group(1))) or
40924092
Search(r'\b(?:struct|union)\s+alignas\s*$', line_prefix) or
40934093
Search(r'\bdecltype$', line_prefix) or
4094+
Search(r'\breturn\s*$', line_prefix) or
40944095
Search(r'\s+=\s*$', line_prefix)):
40954096
match = None
40964097
if (match and

0 commit comments

Comments
 (0)