diff --git a/compiler-rt/test/asan/TestCases/Windows/basic_exception_handling.cpp b/compiler-rt/test/asan/TestCases/Windows/basic_exception_handling.cpp index 6f028147c9049..8d1b9ef17393f 100644 --- a/compiler-rt/test/asan/TestCases/Windows/basic_exception_handling.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/basic_exception_handling.cpp @@ -7,13 +7,14 @@ // This code is based on the repro in https://github.com/google/sanitizers/issues/749 #include #include +#include -void throwInFunction() { throw std::exception("test2"); } +void throwInFunction() { throw std::runtime_error("test2"); } int main() { // case 1: direct throw try { - throw std::exception("test1"); + throw std::runtime_error("test1"); } catch (const std::exception &ex) { puts(ex.what()); // CHECK: test1