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
changes/01/332501/1
dominik.rottsches@intel.com 10 years ago
parent 8769224d8d
commit 34a92d91a7

@ -948,7 +948,8 @@ 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'const\s+NS(?!(Point|Range|Rect|Size)\s*\*)\w*\s*\*')
r'(?<!reinterpret_cast<)'
r'const\s+NS(?!(Point|Range|Rect|Size)\s*\*)\w*\s*\*')
def objective_c_filter(f):
return (source_file_filter(f) and

Loading…
Cancel
Save