Prevent implicit cast from 0 to StructPtr<T>.
Change-Id: Ibe9f789de8af9717b7d9a8d1f82f024acb04d504 Reviewed-on: https://chromium-review.googlesource.com/935753 Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Ken Rockot <rockot@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#554262} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d2ca40e5ebf0f76aed44460e453d78227d63e7dc
This commit is contained in:
Родитель
a629436deb
Коммит
8b11fa27de
|
@ -28,25 +28,34 @@
|
|||
#
|
||||
# Example .nc file:
|
||||
#
|
||||
# #if defined(TEST_NEEDS_SEMICOLON) // [r"expected ',' or ';' at end of input"]
|
||||
# #if defined(NCTEST_NEEDS_SEMICOLON) // [r"expected ',' or ';' at end of input"]
|
||||
#
|
||||
# int a = 1
|
||||
#
|
||||
# #elif defined(TEST_NEEDS_CAST) // [r"invalid conversion from 'void*' to 'char*'"]
|
||||
# #elif defined(NCTEST_NEEDS_CAST) // [r"invalid conversion from 'void*' to 'char*'"]
|
||||
#
|
||||
# void* a = NULL;
|
||||
# char* b = a;
|
||||
#
|
||||
# #endif
|
||||
#
|
||||
# If we needed disable TEST_NEEDS_SEMICOLON, then change the define to:
|
||||
# If we need to disable NCTEST_NEEDS_SEMICOLON, then change the define to:
|
||||
#
|
||||
# DISABLE_TEST_NEEDS_SEMICOLON
|
||||
# TEST_NEEDS_CAST
|
||||
# DISABLED_NCTEST_NEEDS_SEMICOLON
|
||||
# NCTEST_NEEDS_CAST
|
||||
#
|
||||
# The lines above are parsed by a regexp so avoid getting creative with the
|
||||
# formatting or ifdef logic; it will likely just not work.
|
||||
#
|
||||
# To run the tests, try to build the test target. For example:
|
||||
# - Example based on the BUILD.gn example above.
|
||||
# $ ninja -C out ...:my_module_nc_unittests
|
||||
# - Example based on actual tests in //base:
|
||||
# $ ninja -C out base:base_nocompile_tests
|
||||
# Building the test target will succeed if the expected compile errors happened
|
||||
# and will fail if either 1) there were no compile errors, or 2) the compile
|
||||
# errors didn't match the pattern expected by the tests.
|
||||
#
|
||||
# Implementation notes:
|
||||
# The .nc files are actually processed by a python script which executes the
|
||||
# compiler and generates a .cc file that is empty on success, or will have a
|
||||
|
@ -92,6 +101,7 @@ if (enable_nocompile_tests) {
|
|||
"-Wfatal-errors",
|
||||
"-Wthread-safety",
|
||||
"-I" + rebase_path("//", root_build_dir),
|
||||
"-Igen",
|
||||
]
|
||||
if (sysroot != "") {
|
||||
args += [
|
||||
|
|
Загрузка…
Ссылка в новой задаче