[clang] Add tracking source deduction guide for the explicitly-written
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / msvc / strdup_null_input.cpp
blob9fd34fe9a08dd107543e5de90a3b45690bcacc59
1 // RUN: %clang_cl_asan %s -Fe%t.exe
2 // RUN: %run %t.exe | FileCheck %s
4 // CHECK: Success
6 #include <malloc.h>
7 #include <stdio.h>
8 #include <string.h>
10 int main() {
11 // Null input is valid to strdup on Windows.
12 char *nullStr = _strdup(nullptr);
13 free(nullStr);
14 puts("Success");
15 return 0;