diff options
| author | Kostya Serebryany <kcc@google.com> | 2015-09-29 18:23:36 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2015-09-29 18:23:36 +0000 |
| commit | 0c3a5767d940a37b82ff33184f1999340c5a9f58 (patch) | |
| tree | 01566e43d329343f4fe55b27b307309d10202b24 /compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h | |
| parent | a0deee530b38aec0df1e33617a23ad9397ff9ce5 (diff) | |
| download | bcm5719-llvm-0c3a5767d940a37b82ff33184f1999340c5a9f58.tar.gz bcm5719-llvm-0c3a5767d940a37b82ff33184f1999340c5a9f58.zip | |
[sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko
llvm-svn: 248816
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h b/compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h index acf4ff02093..e55fc4f95a9 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_addrhashmap.h @@ -143,7 +143,7 @@ bool AddrHashMap<T, kSize>::Handle::created() const { template<typename T, uptr kSize> bool AddrHashMap<T, kSize>::Handle::exists() const { - return cell_ != 0; + return cell_ != nullptr; } template<typename T, uptr kSize> @@ -160,7 +160,7 @@ void AddrHashMap<T, kSize>::acquire(Handle *h) { h->created_ = false; h->addidx_ = -1U; h->bucket_ = b; - h->cell_ = 0; + h->cell_ = nullptr; // If we want to remove the element, we need exclusive access to the bucket, // so skip the lock-free phase. @@ -250,7 +250,7 @@ void AddrHashMap<T, kSize>::acquire(Handle *h) { } // Store in the add cells. - if (add == 0) { + if (!add) { // Allocate a new add array. const uptr kInitSize = 64; add = (AddBucket*)InternalAlloc(kInitSize); @@ -282,7 +282,7 @@ void AddrHashMap<T, kSize>::acquire(Handle *h) { template<typename T, uptr kSize> void AddrHashMap<T, kSize>::release(Handle *h) { - if (h->cell_ == 0) + if (!h->cell_) return; Bucket *b = h->bucket_; Cell *c = h->cell_; |

