summaryrefslogtreecommitdiff
path: root/tools/cstyle.py
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-12 11:23:57 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-05-12 11:23:57 -0400
commitaf1288ed62e1af97b7aa32951cfea0f203818137 (patch)
tree3e094625c346bfdf56110fb97c31b906628f7169 /tools/cstyle.py
parent163131f4b8572c1b62956f060913b34397340174 (diff)
don't interpret C++ templates with indirection/pointer/reference operators as operators
Diffstat (limited to 'tools/cstyle.py')
-rwxr-xr-xtools/cstyle.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/cstyle.py b/tools/cstyle.py
index bad8309dae..314d7746ae 100755
--- a/tools/cstyle.py
+++ b/tools/cstyle.py
@@ -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