[MSAN] clean up style from D131728
authorKevin Athey <kda@google.com>
Mon, 15 Aug 2022 16:32:54 +0000 (09:32 -0700)
committerKevin Athey <kda@google.com>
Mon, 15 Aug 2022 18:46:07 +0000 (11:46 -0700)
Depends on D131728

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D131903

compiler-rt/lib/msan/msan_report.cpp

index cb6463e..c8fc286 100644 (file)
@@ -37,14 +37,14 @@ class Decorator: public __sanitizer::SanitizerCommonDecorator {
 static void DescribeStackOrigin(const char *so, uptr pc) {
   Decorator d;
   Printf("%s", d.Origin());
-  if (so == nullptr) {
-    Printf("  %sUninitialized value was created in the stack frame%s\n",
-           d.Origin(), d.Default());
-  } else {
+  if (so) {
     Printf(
         "  %sUninitialized value was created by an allocation of '%s%s%s'"
         " in the stack frame%s\n",
         d.Origin(), d.Name(), so, d.Origin(), d.Default());
+  } else {
+    Printf("  %sUninitialized value was created in the stack frame%s\n",
+           d.Origin(), d.Default());
   }
 
   if (pc)