[presubmit] Do not check for V8_NOEXCEPT in include/

We don't have our macros available there, so we should not enforce
V8_NOEXCEPT on types declared in include/v8.h or other files in
include/.

R=mlippautz@chromium.org

Bug: v8:8616
No-Try: true
Change-Id: I51550a072a7957921c6cbd7e0866093f0462ff4e
Reviewed-on: https://chromium-review.googlesource.com/c/1394547
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58520}
This commit is contained in:
Clemens Hammacher 2019-01-03 14:11:38 +01:00 committed by Commit Bot
parent 09ca8f76f6
commit 42a42a68ba

View File

@ -457,6 +457,12 @@ def _CheckNoexceptAnnotations(input_api, output_api):
tools/presubmit.py (https://crbug.com/v8/8616). tools/presubmit.py (https://crbug.com/v8/8616).
""" """
def FilterFile(affected_file):
return input_api.FilterSourceFile(
affected_file,
white_list=(r'src/.*', r'test/.*'))
# matches any class name. # matches any class name.
class_name = r'\b([A-Z][A-Za-z0-9_]*)(?:::\1)?' class_name = r'\b([A-Z][A-Za-z0-9_]*)(?:::\1)?'
# initial class name is potentially followed by this to declare an assignment # initial class name is potentially followed by this to declare an assignment
@ -473,7 +479,8 @@ def _CheckNoexceptAnnotations(input_api, output_api):
regexp = input_api.re.compile(full_pattern, re.MULTILINE) regexp = input_api.re.compile(full_pattern, re.MULTILINE)
errors = [] errors = []
for f in input_api.AffectedFiles(include_deletes=False): for f in input_api.AffectedFiles(file_filter=FilterFile,
include_deletes=False):
with open(f.LocalPath()) as fh: with open(f.LocalPath()) as fh:
for match in re.finditer(regexp, fh.read()): for match in re.finditer(regexp, fh.read()):
errors.append('in {}: {}'.format(f.LocalPath(), errors.append('in {}: {}'.format(f.LocalPath(),