Commit 654a7cb3 authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[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/1224373Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#55919}
parent 3a79fe23
......@@ -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);
......
......@@ -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));
......
......@@ -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;
}
......
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