Fix bad regex.
This corrects an oversight in
https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4004597
that led to IWYU zealously over-recommending #includes.
Bug: chromium:1368812
Change-Id: Ic4b2f93271206be79371378038bdedd40f7079ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4010619
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
diff --git a/cpplint.py b/cpplint.py
index 4ce789e..209c3ac 100755
--- a/cpplint.py
+++ b/cpplint.py
@@ -5350,7 +5350,7 @@
for _template in _templates:
# Match max<type>(..., ...), max(..., ...), but not foo->max or foo.max.
_re_pattern_headers_maybe_templates.append(
- (re.compile(r'(?<![>.]\b)' + _template + r'(<.*?>)?\([^\)]'), _template,
+ (re.compile(r'(?<![>.])\b' + _template + r'(<.*?>)?\([^\)]'), _template,
_header))
# Other scripts may reach in and modify this pattern.