brintos

brintos / llvm-project-archived public Read only

0
0
Text · 471 B · 89ac90f Raw
29 lines · cpp
1// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s2 3#include "Inputs/system-header-simulator-cxx.h"4 5struct Test {6  Test() {}7  ~Test();8};9 10int foo() {11  struct a {12  // The dtor invocation of 'b' and 'c' used to create13  // a loop in the egraph and the analysis stopped after14  // this point.15    Test b, c;16  } d;17  return 1;18}19 20int main() {21  if (foo()) {22  }23 24  int x;25  int y = x;26  // expected-warning@-1{{Assigned value is uninitialized}}27  (void)y;28}29