diff options
Diffstat (limited to 'test/ubsan/TestCases/Misc/bool.cpp')
-rw-r--r-- | test/ubsan/TestCases/Misc/bool.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ubsan/TestCases/Misc/bool.cpp b/test/ubsan/TestCases/Misc/bool.cpp index 37ecea27c941..f6dc24e4bc78 100644 --- a/test/ubsan/TestCases/Misc/bool.cpp +++ b/test/ubsan/TestCases/Misc/bool.cpp @@ -1,10 +1,13 @@ -// RUN: %clangxx -fsanitize=bool %s -O3 -o %t && not %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -fsanitize=bool %s -O3 -o %t +// RUN: not %run %t 2>&1 | FileCheck %s +// RUN: %env_ubsan_opts=print_summary=1:report_error_type=1 not %run %t 2>&1 | FileCheck %s --check-prefix=SUMMARY unsigned char NotABool = 123; int main(int argc, char **argv) { bool *p = (bool*)&NotABool; - // CHECK: bool.cpp:9:10: runtime error: load of value 123, which is not a valid value for type 'bool' + // CHECK: bool.cpp:[[@LINE+1]]:10: runtime error: load of value 123, which is not a valid value for type 'bool' return *p; + // SUMMARY: SUMMARY: {{.*}}Sanitizer: invalid-bool-load {{.*}}bool.cpp:[[@LINE-1]] } |