Fine tune const NSClass* presubmit check

Blink CL https://codereview.chromium.org/879533003/ defines own
casts to convert between bridged types. The cast helpers in base
cannot be used in Blink. Fine tune the presubmit check to allow
for those by adding a negative look behind for reinterpret_cast.

BUG=

Review URL: https://codereview.chromium.org/1034523003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294560 0039d316-1c4b-4281-b951-d872f2087c98
parent 8769224d
......@@ -948,6 +948,7 @@ def _RietveldOwnerAndReviewers(input_api, email_regexp, approval_needed=False):
def _CheckConstNSObject(input_api, output_api, source_file_filter):
"""Checks to make sure no objective-c files have |const NSSomeClass*|."""
pattern = input_api.re.compile(
r'(?<!reinterpret_cast<)'
r'const\s+NS(?!(Point|Range|Rect|Size)\s*\*)\w*\s*\*')
def objective_c_filter(f):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment