From 5a5606bec30be08480fcda2941258cba3a212c2c Mon Sep 17 00:00:00 2001 From: Clemens Hammacher Date: Mon, 7 Jan 2019 13:35:49 +0100 Subject: [PATCH] [presubmit] Extend regular expression for V8_NOEXCEPT We were missing a few declarations, especially fully-qualified declarations in cc files like here: https://crrev.com/c/1396459 R=mlippautz@chromium.org Bug: v8:8616 No-Try: true Change-Id: Iff93f1cd4fde18ac7fc8391e459e6bdcb4eb8f9b Reviewed-on: https://chromium-review.googlesource.com/c/1397706 Reviewed-by: Michael Lippautz Commit-Queue: Clemens Hammacher Cr-Commit-Position: refs/heads/master@{#58585} --- PRESUBMIT.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index a093df492f..34002ec0bf 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -464,13 +464,13 @@ def _CheckNoexceptAnnotations(input_api, output_api): # 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 # operator. - potential_assignment = r'(?:&\s+operator=)?\s*' + potential_assignment = r'(?:&\s+(?:\1::)?operator=)?\s*' # matches an argument list that contains only a reference to a class named # like the first capture group, potentially const. - single_class_ref_arg = r'\((?:const\s+)?\1(?:::\1)?&&?[^,;)]*\)' + single_class_ref_arg = r'\(\s*(?:const\s+)?\1(?:::\1)?&&?[^,;)]*\)' # matches anything but a sequence of whitespaces followed by either # V8_NOEXCEPT or "= delete". not_followed_by_noexcept = r'(?!\s+(?:V8_NOEXCEPT|=\s+delete)\b)'