[compiler-rt] 9cf4f10 - [NFC][tsan] `ptr != 0` to implicit check (#77144)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 14:32:22 PST 2024
Author: Vitaly Buka
Date: 2024-01-05T14:32:18-08:00
New Revision: 9cf4f10609435bccd5fb32b979557a9e339563b6
URL: https://github.com/llvm/llvm-project/commit/9cf4f10609435bccd5fb32b979557a9e339563b6
DIFF: https://github.com/llvm/llvm-project/commit/9cf4f10609435bccd5fb32b979557a9e339563b6.diff
LOG: [NFC][tsan] `ptr != 0` to implicit check (#77144)
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_report.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cpp b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
index 167e4be4fc0e26..cdcc20b9758f48 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_report.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_report.cpp
@@ -274,13 +274,13 @@ static ReportStack *ChooseSummaryStack(const ReportDesc *rep) {
}
static bool FrameIsInternal(const SymbolizedStack *frame) {
- if (frame == 0)
+ if (!frame)
return false;
const char *file = frame->info.file;
const char *module = frame->info.module;
- if (file != 0 && (internal_strstr(file, "/compiler-rt/lib/")))
+ if (file && (internal_strstr(file, "/compiler-rt/lib/")))
return true;
- if (module != 0 && (internal_strstr(module, "libclang_rt.")))
+ if (module && (internal_strstr(module, "libclang_rt.")))
return true;
return false;
}
More information about the llvm-commits
mailing list