From da90c53e3db0b4d0da541d57475984cbf76799ed Mon Sep 17 00:00:00 2001 From: Avi Drissman Date: Tue, 8 Jan 2019 15:57:21 +0000 Subject: [PATCH] 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 Commit-Queue: Avi Drissman --- cpplint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpplint.py b/cpplint.py index e3b36c6cc6..0edcf706db 100755 --- a/cpplint.py +++ b/cpplint.py @@ -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(')')