[AA] Rename CaptureInfo -> CaptureAnalysis (NFC) (#116842)
[llvm-project.git] / compiler-rt / test / msan / loop-scope.cpp
blob638bdbe173241326a9052510cfc3a8c6d3c62e32
1 // RUN: %clangxx_msan -O2 %s -o %t && \
2 // RUN: not %run %t 2>&1 | FileCheck %s
4 #include <stdlib.h>
6 int *p;
8 int main() {
9 for (int i = 0; i < 3; i++) {
10 int x;
11 if (i == 0)
12 x = 0;
13 p = &x;
15 return *p; // BOOM
16 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
17 // CHECK: #0 0x{{.*}} in main {{.*}}loop-scope.cpp:[[@LINE-2]]