Update BUILD.gn
This commit is contained in:
parent
32768dcfca
commit
d451312686
1 changed files with 15 additions and 16 deletions
|
@ -1585,22 +1585,21 @@ config("default_warnings") {
|
|||
# configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
|
||||
|
||||
config("prevent_unsafe_narrowing") {
|
||||
# TODO(crbug.com/1292951): Enable this config
|
||||
# if (is_clang) {
|
||||
# cflags = [
|
||||
# "-Wshorten-64-to-32",
|
||||
# "-Wimplicit-int-conversion",
|
||||
# "-Wsign-compare",
|
||||
# "-Wsign-conversion",
|
||||
# ]
|
||||
# if (!is_nacl) {
|
||||
# cflags += [
|
||||
# # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
|
||||
# # fixing types to be sign-correct.
|
||||
# "-Wtautological-unsigned-zero-compare",
|
||||
# ]
|
||||
# }
|
||||
# }
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
"-Wshorten-64-to-32",
|
||||
"-Wimplicit-int-conversion",
|
||||
"-Wsign-compare",
|
||||
"-Wsign-conversion",
|
||||
]
|
||||
if (!is_nacl) {
|
||||
cflags += [
|
||||
# Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
|
||||
# fixing types to be sign-correct.
|
||||
"-Wtautological-unsigned-zero-compare",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# chromium_code ---------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue