aboutsummaryrefslogtreecommitdiff
path: root/clint.py
diff options
context:
space:
mode:
authorNicolas Hillegeer <nicolas@hillegeer.com>2014-05-18 11:21:32 +0200
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-18 06:45:39 -0300
commitb591447f772ed5411e207854b2125bff08902bf7 (patch)
tree4aadd55b776f7a991700cafe55757a9f1427c5d7 /clint.py
parent96a9b5eaeef9d8cf9210a680beedae06a87f0e6b (diff)
downloadrneovim-b591447f772ed5411e207854b2125bff08902bf7.tar.gz
rneovim-b591447f772ed5411e207854b2125bff08902bf7.tar.bz2
rneovim-b591447f772ed5411e207854b2125bff08902bf7.zip
clint: disregard compound literal return
This allows lines like: return (my_struct_type) { .my_int = 5, .my_str = "" }; Thanks to @watk for finding and fixing it!
Diffstat (limited to 'clint.py')
-rwxr-xr-xclint.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/clint.py b/clint.py
index 01d179a3f7..13d2d8cbe9 100755
--- a/clint.py
+++ b/clint.py
@@ -2307,7 +2307,8 @@ def CheckBraces(filename, clean_lines, linenum, error):
'TEST', 'TEST_F', 'MATCHER', 'MATCHER_P', 'TYPED_TEST',
'EXCLUSIVE_LOCKS_REQUIRED', 'SHARED_LOCKS_REQUIRED',
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
- Search(r'\s+=\s*$', line_prefix)):
+ Search(r'\s+=\s*$', line_prefix) or
+ Search(r'^\s*return\s*$', line_prefix)):
match = None
else: