brintos

brintos / llvm-project-archived public Read only

0
0
Text · 372 B · 3789c32 Raw
17 lines · c
1// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s2 3int **h;4int overflow_in_memregion(long j) {5  for (int l = 0;; ++l) {6    if (j - l > 0)7      return h[j - l][0]; // no-crash8  }9  return 0;10}11 12void rdar39593879(long long *d) {13  long e, f;14  e = f = d[1]; // no-crash15  for (; d[e];) f-- > 0; // expected-warning{{relational comparison result unused}}; 16}17