Эх сурвалжийг харах

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>
Peter Kasting 2 жил өмнө
parent
commit
e6f3d66bae
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      cpplint.py

+ 1 - 1
cpplint.py

@@ -5350,7 +5350,7 @@ for _header, _templates in _HEADERS_MAYBE_TEMPLATES:
   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.