[PATCH] D48660: [UBSan] Add silence_unsigned_overflow flag.

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 27 11:04:18 PDT 2018


vsk accepted this revision.
vsk added a comment.
This revision is now accepted and ready to land.

LGTM, thanks! Just a small nitpick inline.

Also, if you have the time, please document this in clang/docs/UndefinedBehaviorSanitizer.rst.



================
Comment at: compiler-rt/test/ubsan/TestCases/Integer/no-recover.cpp:3
 // RUN: %clangxx -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=all -fsanitize-recover=unsigned-integer-overflow %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=RECOVER
+// RUN: %env_ubsan_opts=silence_unsigned_overflow=1 %run %t 2>&1 | FileCheck %s --check-prefix=SILENT-RECOVER
 // RUN: %clangxx -fsanitize=unsigned-integer-overflow -fno-sanitize-recover=unsigned-integer-overflow %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=ABORT
----------------
You can just pass the --allow-empty flag to FileCheck instead of adding the printf.


https://reviews.llvm.org/D48660





More information about the llvm-commits mailing list