clint.py: a function name starting with for is not a for statement

This commit is contained in:
Björn Linse 2016-02-25 11:18:55 +01:00
parent c1487b9685
commit e17e5547d7

View File

@ -2552,7 +2552,7 @@ def CheckBraces(filename, clean_lines, linenum, error):
# If should always have a brace
for blockstart in ('if', 'while', 'for'):
if Match(r'\s*{0}[^{{]*$'.format(blockstart), line):
if Match(r'\s*{0}(?!\w)[^{{]*$'.format(blockstart), line):
pos = line.find(blockstart)
pos = line.find('(', pos)
if pos > 0: