Move MSan lit-tests under test/msan
[blocksruntime.git] / lib / asan / lit_tests / TestCases / use-after-scope-nobug.cc
blobc23acf76eaeefd9aa2adb00ce2a6f37ea1ec99f6
1 // RUN: %clangxx_asan -O0 -fsanitize=use-after-scope %s -o %t && %t
3 #include <stdio.h>
5 int main() {
6 int *p = 0;
7 // Variable goes in and out of scope.
8 for (int i = 0; i < 3; i++) {
9 int x = 0;
10 p = &x;
12 printf("PASSED\n");
13 return 0;