diff options
Diffstat (limited to 'compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp')
-rw-r--r-- | compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp b/compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp new file mode 100644 index 000000000000..cacf461b4f33 --- /dev/null +++ b/compiler-rt/test/asan/TestCases/Windows/msvc/use_after_return_linkage.cpp @@ -0,0 +1,14 @@ +// Make sure LIBCMT doesn't accidentally get added to the list of DEFAULTLIB +// directives. + +// REQUIRES: asan-dynamic-runtime +// RUN: %clang_cl_asan -LD %s | FileCheck %s +// CHECK: Creating library +// CHECK-NOT: LIBCMT + +void foo(int *p) { *p = 42; } + +__declspec(dllexport) void bar() { + int x; + foo(&x); +} |