Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2445)

Unified Diff: cc/PRESUBMIT.py

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/whitespace_file.txt ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/PRESUBMIT.py
diff --git a/cc/PRESUBMIT.py b/cc/PRESUBMIT.py
index 1aa48f3501ad2d186b20b626ae2de8013bb40423..46c3a54349e54bd37d9ea158d7646c9c96b610d5 100644
--- a/cc/PRESUBMIT.py
+++ b/cc/PRESUBMIT.py
@@ -191,12 +191,6 @@ def CheckScopedPtr(input_api, output_api,
errors.append(output_api.PresubmitError(
'%s:%d uses scoped_ptr<T>(). Use nullptr instead.' %
(f.LocalPath(), line_number)))
- # Disallow:
- # foo.PassAs<T>();
- if re.search(r'\bPassAs<.*?>\(\)', line):
- errors.append(output_api.PresubmitError(
- '%s:%d uses PassAs<T>(). Use Pass() instead.' %
- (f.LocalPath(), line_number)))
return errors
def FindUnquotedQuote(contents, pos):
@@ -332,42 +326,6 @@ def CheckForUseOfWrongClock(input_api,
else:
return []
-def CheckOverrideFinal(input_api, output_api,
- whitelist=CC_SOURCE_FILES, blacklist=None):
- """Make sure new lines of code don't use the OVERRIDE or FINAL macros."""
-
- # TODO(mostynb): remove this check once the macros are removed
- # from base/compiler_specific.h.
-
- errors = []
-
- source_file_filter = lambda x: input_api.FilterSourceFile(
- x, white_list=CC_SOURCE_FILES, black_list=None)
-
- override_files = []
- final_files = []
-
- for f in input_api.AffectedSourceFiles(source_file_filter):
- contents = input_api.ReadFile(f, 'rb')
-
- # "override" and "final" should be used instead of OVERRIDE/FINAL now.
- if re.search(r"\bOVERRIDE\b", contents):
- override_files.append(f.LocalPath())
-
- if re.search(r"\bFINAL\b", contents):
- final_files.append(f.LocalPath())
-
- if override_files:
- return [output_api.PresubmitError(
- 'These files use OVERRIDE instead of using override:',
- items=override_files)]
- if final_files:
- return [output_api.PresubmitError(
- 'These files use FINAL instead of using final:',
- items=final_files)]
-
- return []
-
def CheckChangeOnUpload(input_api, output_api):
results = []
results += CheckAsserts(input_api, output_api)
@@ -380,7 +338,6 @@ def CheckChangeOnUpload(input_api, output_api):
results += CheckNamespace(input_api, output_api)
results += CheckForUseOfWrongClock(input_api, output_api)
results += FindUselessIfdefs(input_api, output_api)
- results += CheckOverrideFinal(input_api, output_api)
results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api)
return results
« no previous file with comments | « build/whitespace_file.txt ('k') | cc/debug/rasterize_and_record_benchmark_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698