Add PRESUBMIT check for std::regex.
Since re2 is already used elsewhere in Chrome, we should use it to
avoid unnecessary binary size regressions caused by std::regex.
Bug: 759548
Change-Id: Ic3d8b251dc0757fabff61d6c6b778799151a625c
Reviewed-on: https://chromium-review.googlesource.com/642587
Reviewed-by: Dirk Pranke <[email protected]>
Commit-Queue: Eric Stevenson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#498599}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 08a906c..5613b73 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -435,6 +435,15 @@
),
True,
(),
+ ),
+ (
+ r'std::regex',
+ (
+ 'Using std::regex adds unnecessary binary size to Chrome. Please use',
+ 're2::RE2 instead (crbug/755321)',
+ ),
+ True,
+ (),
)
)