[cleanup] Replace 0 and NULL with nullptr for compiler files.

Fixing clang-tidy warning.

Bug: v8:8015
Change-Id: I20fd23b5370d15dddc913f6bdb05e649d71c2059
Reviewed-on: https://chromium-review.googlesource.com/1224373
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55919}
This commit is contained in:
Florian Sattler 2018-09-13 14:55:35 +02:00 committed by Commit Bot
parent 3a79fe2363
commit 654a7cb375
4 changed files with 239 additions and 239 deletions

View File

@ -751,7 +751,7 @@ TEST_F(GraphReducerTest, Sorter1) {
Node* n1 = graph()->NewNode(&kOpA0);
Node* n2 = graph()->NewNode(&kOpA1, n1);
Node* n3 = graph()->NewNode(&kOpA1, n1);
Node* end = NULL; // Initialize to please the compiler.
Node* end = nullptr; // Initialize to please the compiler.
if (i == 0) end = graph()->NewNode(&kOpA2, n2, n3);
if (i == 1) end = graph()->NewNode(&kOpA2, n3, n2);

View File

@ -63,7 +63,7 @@ TEST_F(NodeCacheTest, Int32Constant_hits) {
for (int i = 0; i < kSize; i++) {
int32_t v = i * -55;
Node** pos = cache.Find(zone(), v);
if (*pos != NULL) {
if (*pos != nullptr) {
EXPECT_EQ(nodes[i], *pos);
hits++;
}
@ -101,7 +101,7 @@ TEST_F(NodeCacheTest, Int64Constant_hits) {
for (int i = 0; i < kSize; i++) {
int64_t v = static_cast<int64_t>(i) * static_cast<int64_t>(5003001);
Node** pos = cache.Find(zone(), v);
if (*pos != NULL) {
if (*pos != nullptr) {
EXPECT_EQ(nodes[i], *pos);
hits++;
}
@ -118,7 +118,7 @@ TEST_F(NodeCacheTest, GetCachedNodes_int32) {
for (size_t i = 0; i < arraysize(constants); i++) {
int32_t k = constants[i];
Node** pos = cache.Find(zone(), k);
if (*pos != NULL) {
if (*pos != nullptr) {
ZoneVector<Node*> nodes(zone());
cache.GetCachedNodes(&nodes);
EXPECT_THAT(nodes, Contains(*pos));
@ -141,7 +141,7 @@ TEST_F(NodeCacheTest, GetCachedNodes_int64) {
for (size_t i = 0; i < arraysize(constants); i++) {
int64_t k = constants[i];
Node** pos = cache.Find(zone(), k);
if (*pos != NULL) {
if (*pos != nullptr) {
ZoneVector<Node*> nodes(zone());
cache.GetCachedNodes(&nodes);
EXPECT_THAT(nodes, Contains(*pos));

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,7 @@ class TestNodeMatcher : public MatcherInterface<Node*> {
bool MatchAndExplain(Node* node,
MatchResultListener* listener) const override {
if (node == NULL) {
if (node == nullptr) {
*listener << "which is NULL";
return false;
}