const StringLiteral* Str = SR->getStringLiteral();
// We intentionally made the size value signed because it participates in
// operations with signed indices.
- return NonLoc::MakeVal(getBasicVals(), Str->getByteLength(), false);
+ return NonLoc::MakeVal(getBasicVals(), Str->getByteLength() + 1, false);
}
if (const AnonTypedRegion* ATR = dyn_cast<AnonTypedRegion>(R)) {
char f1() {
char* s = "abcd";
- return s[4]; // expected-warning{{Load or store into an out-of-bound memory position.}}
+ return s[5]; // expected-warning{{Load or store into an out-of-bound memory position.}}
}