From 84fb7c09afcbaa5ffd7ee4f8e5db9908f5708251 Mon Sep 17 00:00:00 2001 From: Alexey Porotnikov Date: Tue, 26 Dec 2017 17:01:58 +0200 Subject: [PATCH] add "return" to the compound literal exclusions inhibits readability/brace warning for compound literals in return statement --- cpplint/cpplint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cpplint/cpplint.py b/cpplint/cpplint.py index 53dbe81..29af2e8 100755 --- a/cpplint/cpplint.py +++ b/cpplint/cpplint.py @@ -3945,6 +3945,7 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error): (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'\bdecltype$', line_prefix) or + Search(r'\breturn\s*$', line_prefix) or Search(r'\s+=\s*$', line_prefix)): match = None if (match and