Update cpplint.

Using base/std::size and std::extent does not result in the creation
of a VLA; cpplint should not warn on their use.

BUG=837308

Change-Id: Ie133b2144b6c1c9f4f5e406144f28b333a212197
Reviewed-on: https://chromium-review.googlesource.com/c/1399961
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
changes/61/1399961/2
Avi Drissman 7 years ago committed by Commit Bot
parent d16b51b9bf
commit da90c53e3d

3
cpplint.py vendored

@ -4665,6 +4665,9 @@ def CheckLanguage(filename, clean_lines, linenum, file_extension,
if Search(r'sizeof\(.+\)', tok): continue
if Search(r'arraysize\(\w+\)', tok): continue
if Search(r'base::size\(\w+\)', tok): continue
if Search(r'std::size\(\w+\)', tok): continue
if Search(r'std::extent\(\w+\)', tok): continue
tok = tok.lstrip('(')
tok = tok.rstrip(')')

Loading…
Cancel
Save