Commit 9bb1a28a authored by Ramya Nagarajan's avatar Ramya Nagarajan Committed by Chromium LUCI CQ

[Project Code Inclusion] Remove use of blacklist

Replace uses with blocklist.

Bug: 1097269
Change-Id: I61ba36afd6fc9a121dc7979091fe87b637786c79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2603853Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Ramya Nagarajan <ramyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843652}
parent ead64c8a
......@@ -18,5 +18,5 @@ struct Derived2 : public Base {
#line 123 "/src/chrome-breakpad/src/breakpad/myheader.h"
struct Derived3 : public Base {
virtual void foo(); // Should not warn; file is in a blacklisted dir.
virtual void foo(); // Should not warn; file is in a blocklisted dir.
};
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Blacklisted typedefs
// Blocklisted typedefs
typedef __INTMAX_TYPE__ intmax_t;
typedef __UINTMAX_TYPE__ uintmax_t;
typedef int intptr_t;
......@@ -166,9 +166,9 @@ void SomeWriteFunction(base::Pickle* pickle) {
void TestWriteParamInTemplates() {
// These specializations call WriteParam() on various banned types, either
// because they were specified directly (long) or because non-blacklisted
// because they were specified directly (long) or because non-blocklisted
// typedef (uint64_t) was stripped down to its underlying type, which is
// blacklisted when used as is (unsigned long).
// blocklisted when used as is (unsigned long).
// However, since it's hard (if not impossible) to check specializations
// properly, we're simply not checking them.
SomeClass<long>::Write(nullptr);
......@@ -212,7 +212,7 @@ void TestWriteParamArgument() {
IPC::WriteParam(nullptr, p); \
}
// ERROR: blacklisted types / typedefs
// ERROR: blocklisted types / typedefs
CALL_WRITEPARAM(long) // ERROR
CALL_WRITEPARAM(unsigned long) // ERROR
CALL_WRITEPARAM(intmax_t) // ERROR
......@@ -230,7 +230,7 @@ void TestWriteParamArgument() {
CALL_WRITEPARAM(time_t) // ERROR
CALL_WRITEPARAM(suseconds_t) // ERROR
// ERROR: typedef to blacklisted typedef
// ERROR: typedef to blocklisted typedef
typedef size_t my_size;
CALL_WRITEPARAM(my_size) // ERROR
......@@ -240,7 +240,7 @@ void TestWriteParamArgument() {
IPC::WriteParam(nullptr, p + 1); // ERROR
}
// ERROR: long chain of typedefs, ends up with blacklisted typedef
// ERROR: long chain of typedefs, ends up with blocklisted typedef
{
typedef size_t my_size_base;
typedef const my_size_base my_size;
......@@ -249,11 +249,11 @@ void TestWriteParamArgument() {
IPC::WriteParam(nullptr, p); // ERROR
}
// ERROR: template specialization references blacklisted type
// ERROR: template specialization references blocklisted type
CALL_WRITEPARAM(std::vector<long>) // ERROR
CALL_WRITEPARAM(std::vector<size_t>) // ERROR
// OK: typedef to blacklisted type
// OK: typedef to blocklisted type
typedef long my_long;
CALL_WRITEPARAM(my_long) // OK
......@@ -261,9 +261,9 @@ void TestWriteParamArgument() {
CALL_WRITEPARAM(char) // OK
CALL_WRITEPARAM(int) // OK
CALL_WRITEPARAM(uint32_t) // OK
CALL_WRITEPARAM(int64_t) // OK
CALL_WRITEPARAM(int64_t) // OK
// OK: long chain of typedefs, ends up with non-blacklisted typedef
// OK: long chain of typedefs, ends up with non-blocklisted typedef
{
typedef uint32_t my_int_base;
typedef const my_int_base my_int;
......@@ -272,7 +272,7 @@ void TestWriteParamArgument() {
IPC::WriteParam(nullptr, p); // OK
}
// OK: template specialization references non-blacklisted type
// OK: template specialization references non-blocklisted type
CALL_WRITEPARAM(std::vector<char>) // OK
CALL_WRITEPARAM(std::vector<my_long>) // OK
......@@ -326,13 +326,13 @@ void TestWriteParamMemberArgument() {
IPC::WriteParam(nullptr, p.long_data); // ERROR
// This one is flaky and depends on whether size_t is typedefed to a
// blacklisted type (unsigned long).
//IPC::WriteParam(nullptr, p.get<size_t>()); // ERROR
// blocklisted type (unsigned long).
// IPC::WriteParam(nullptr, p.get<size_t>()); // ERROR
IPC::WriteParam(nullptr, p.get_size()); // ERROR
IPC::WriteParam(nullptr, p.size_data); // ERROR
// Information about uint64_t gets lost, and plugin sees WriteParam()
// call on unsigned long, which is blacklisted.
// call on unsigned long, which is blocklisted.
IPC::WriteParam(nullptr, p.get<uint64_t>()); // ERROR
IPC::WriteParam(nullptr, p.get_uint64()); // OK
IPC::WriteParam(nullptr, p.uint64_data); // OK
......@@ -343,8 +343,8 @@ void TestWriteParamMemberArgument() {
IPC::WriteParam(nullptr, p.uint64s_data); // OK
// This one is flaky and depends on whether size_t is typedefed to a
// blacklisted type (unsigned long).
//IPC::WriteParam(nullptr, p.get<std::vector<size_t>>());
// blocklisted type (unsigned long).
// IPC::WriteParam(nullptr, p.get<std::vector<size_t>>());
IPC::WriteParam(nullptr, p.get_sizes()); // ERROR
IPC::WriteParam(nullptr, p.sizes_data); // ERROR
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment