On Fri, Jan 23, 2009 at 10:17 AM, Zhongxing Xu <[email protected]>wrote:
> > > On Fri, Jan 23, 2009 at 4:36 AM, Ted Kremenek <[email protected]> wrote: > >> Author: kremenek >> Date: Thu Jan 22 14:36:33 2009 >> New Revision: 62782 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=62782&view=rev >> Log: >> Test more array logic in outofbound.c >> >> Modified: >> cfe/trunk/test/Analysis/outofbound.c >> >> Modified: cfe/trunk/test/Analysis/outofbound.c >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/outofbound.c?rev=62782&r1=62781&r2=62782&view=diff >> >> >> ============================================================================== >> --- cfe/trunk/test/Analysis/outofbound.c (original) >> +++ cfe/trunk/test/Analysis/outofbound.c Thu Jan 22 14:36:33 2009 >> @@ -2,5 +2,6 @@ >> >> char f1() { >> char* s = "abcd"; >> - return s[6]; // expected-warning{{Load or store into an out-of-bound >> memory position.}} >> + char c = s[4]; // no-warning >> + return s[5] + c; // expected-warning{{Load or store into an >> out-of-bound memory position.}} > > > Hi Ted, > > s[5] is a legal position. Strings are terminated by '\0'. > Sorry, I was wrong. > > > >> } >> >> >> _______________________________________________ >> cfe-commits mailing list >> [email protected] >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >> > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
