13
0

don't interpret C++ templates with indirection/pointer/reference operators as operators

This commit is contained in:
Paul Davis 2015-05-12 11:23:57 -04:00
parent 163131f4b8
commit af1288ed62

View File

@ -210,7 +210,8 @@ class CStyleChecker:
self.error (msg)
if re.search ("[a-zA-Z0-9][<>!=^/&\|]{1,2}[a-zA-Z0-9]", line):
if not re.search (".*#include.*[a-zA-Z0-9]/[a-zA-Z]", line):
# ignore #include <foo.h> and C++ templates with indirection/pointer/reference operators
if not re.search (".*#include.*[a-zA-Z0-9]/[a-zA-Z]", line) and not re.search ("[a-zA-Z0-9_]>[&\*]", line):
self.error ("missing space around operator")
self.last_line_indent = indent