[compiler-rt] c228410 - [MSAN] clean up style from D131728

Kevin Athey via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 15 11:46:12 PDT 2022


Author: Kevin Athey
Date: 2022-08-15T11:46:07-07:00
New Revision: c22841049eba12a2003435201b8b27c57f9fbc5d

URL: https://github.com/llvm/llvm-project/commit/c22841049eba12a2003435201b8b27c57f9fbc5d
DIFF: https://github.com/llvm/llvm-project/commit/c22841049eba12a2003435201b8b27c57f9fbc5d.diff

LOG: [MSAN] clean up style from D131728

Depends on D131728

Reviewed By: vitalybuka

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

Added: 
    

Modified: 
    compiler-rt/lib/msan/msan_report.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/msan/msan_report.cpp b/compiler-rt/lib/msan/msan_report.cpp
index cb6463e2c4b50..c8fc286c782df 100644
--- a/compiler-rt/lib/msan/msan_report.cpp
+++ b/compiler-rt/lib/msan/msan_report.cpp
@@ -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)


        


More information about the llvm-commits mailing list