summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/outofbound.c
blob: ab9c0cfa4c8a975bc709e0aaaf5bc434c2677c7e (plain)
1
2
3
4
5
6
// RUN: clang -analyze -checker-simple -analyzer-store-region -verify %s

char f1() {
  char* s = "abcd";
  return s[5]; // expected-warning{{Load or store into an out-of-bound memory position.}}
}
OpenPOWER on IntegriCloud