Index: cc/PRESUBMIT.py |
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py |
index 6dff3716798daa8bc6bf629f08c0763860055755..9eac935598aeb9efd3fc7e5df6e49f2eea207d40 100644 |
--- a/cc/PRESUBMIT.py |
+++ b/cc/PRESUBMIT.py |
@@ -170,9 +170,8 @@ def CheckScopedPtr(input_api, output_api, |
('%s:%d uses explicit scoped_ptr constructor. ' + |
'Use make_scoped_ptr() instead.') % (f.LocalPath(), line_number))) |
# Disallow: |
- # return scoped_ptr<T>(); |
- # bar = scoped_ptr<T>(); |
- if re.search(r'(=|\breturn)\s*scoped_ptr<.*?>\(\)', line): |
+ # scoped_ptr<T>() |
+ if re.search(r'\bscoped_ptr<.*?>\(\)', line): |
errors.append(output_api.PresubmitError( |
'%s:%d uses scoped_ptr<T>(). Use nullptr instead.' % |
(f.LocalPath(), line_number))) |