diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-18 04:23:18 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-18 04:23:18 +0000 |
| commit | 52987120f966c0031684402ae3b13016be48a198 (patch) | |
| tree | 41b147ee8b26e69a6b9cfe54b00191472251c325 /compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp | |
| parent | 74a133fa9a11d6ac366c7825681b2d4c5ad31f35 (diff) | |
| download | bcm5719-llvm-52987120f966c0031684402ae3b13016be48a198.tar.gz bcm5719-llvm-52987120f966c0031684402ae3b13016be48a198.zip | |
ubsan: if the frontend didn't provide us with a source location, try to work
one out from the return address. Currently, we can only resolve this address to
a file and line number if we have an external symbolizer.
llvm-svn: 170407
Diffstat (limited to 'compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp')
| -rw-r--r-- | compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp b/compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp index 4df1fb82a5d..8fafe7eac05 100644 --- a/compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp +++ b/compiler-rt/lib/ubsan/lit_tests/Misc/bool.cpp @@ -1,10 +1,11 @@ -// RUN: %clang -fsanitize=bool %s -O3 -o %t && %t 2>&1 | FileCheck %s +// RUN: %clang -fsanitize=bool %s -O3 -o %T/bool.exe && %T/bool.exe 2>&1 | FileCheck %s unsigned char NotABool = 123; int main(int argc, char **argv) { bool *p = (bool*)&NotABool; - // CHECK: error: load of value 123, which is not a valid value for type 'bool' + // FIXME: Provide a better source location here. + // CHECK: bool.exe:0x{{[0-9a-f]*}}: runtime error: load of value 123, which is not a valid value for type 'bool' return *p; } |

