[LLVMdev] [PATCH] ubsan: add 'UndefinedBehaviorSanitizer' to messages

Ben Boeckel mathstuf at gmail.com
Mon Oct 6 11:33:35 PDT 2014


This allows detection of them to be much more accurate since 'runtime
error:' and 'note:' are fairly generic.

Signed-off-by: Ben Boeckel <ben.boeckel at kitware.com>
---
 lib/ubsan/ubsan_diag.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/ubsan/ubsan_diag.cc b/lib/ubsan/ubsan_diag.cc
index fa23521..ba4d9b8 100644
--- a/lib/ubsan/ubsan_diag.cc
+++ b/lib/ubsan/ubsan_diag.cc
@@ -313,12 +313,12 @@ Diag::~Diag() {
 
   switch (Level) {
   case DL_Error:
-    Printf("%s runtime error: %s%s",
+    Printf("%s UndefinedBehaviorSanitizer runtime error: %s%s",
            Decor.Warning(), Decor.EndWarning(), Decor.Bold());
     break;
 
   case DL_Note:
-    Printf("%s note: %s", Decor.Note(), Decor.EndNote());
+    Printf("%s UndefinedBehaviorSanitizer note: %s", Decor.Note(), Decor.EndNote());
     break;
   }
 
-- 
2.1.0




More information about the llvm-dev mailing list