Commit 3e87ceaf authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Allow a space after __except

__except () is the canonical layout for code that uses __try/__except,
Microsoft's structured exception handling. The majority of __except
uses in our code use a space after the keyword. However cpplint.py
thinks that __except is a function name. Apparently we have been forcing
this through by ignoring the presubmits. This just adds __except to the
list of exceptions to the whitespace/parens rule.

Change-Id: I2384cd32f26e3aa6a4b0150451a9a61147483e2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2173644
Commit-Queue: Aaron Gable <agable@chromium.org>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
parent 2072ffc0
......@@ -2869,7 +2869,7 @@ def CheckSpacingForFunctionCall(filename, clean_lines, linenum, error):
'Extra space after (')
if (Search(r'\w\s+\(', fncall) and
not Search(r'_{0,2}asm_{0,2}\s+_{0,2}volatile_{0,2}\s+\(', fncall) and
not Search(r'#\s*define|typedef|using\s+\w+\s*=', fncall) and
not Search(r'#\s*define|typedef|__except|using\s+\w+\s*=', fncall) and
not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall) and
not Search(r'\bcase\s+\(', fncall)):
# TODO(unknown): Space after an operator function seem to be a common
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment