[clang] Add tracking source deduction guide for the explicitly-written
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / msvc / iostream_sbo.cpp
blob3d4158f8c331e6d2fdc0630d07542294e9966bab
1 // First, check this works with the default ignorelist:
2 // RUN: %clang_cl_asan -Od %s -Fe%t
3 // RUN: echo "42" | %run %t 2>&1 | FileCheck %s
4 //
5 // Then, make sure it still works when a user uses their own ignorelist file:
6 // RUN: %clang_cl_asan -Od %s -fsanitize-ignorelist=%p/../../Helpers/initialization-ignorelist.txt -Fe%t2
7 // RUN: echo "42" | %run %t2 2>&1 | FileCheck %s
9 #include <iostream>
11 int main() {
12 int i;
13 std::cout << "Type i: ";
14 std::cin >> i;
15 return 0;
16 // CHECK: Type i:
17 // CHECK-NOT: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]