[cfe-dev] graphviz problem

Zhongxing Xu xuzhongxing at gmail.com
Tue Nov 11 19:02:31 PST 2008


Thanks, Ted. I should read that comment.

On Wed, Nov 12, 2008 at 10:52 AM, Ted Kremenek <kremenek at apple.com> wrote:

> From Expr.h:
> /// StringLiteral - This represents a string literal expression, e.g. "foo"
> /// or L"bar" (wide strings).  The actual string is returned by
> getStrData()
> /// is NOT null-terminated, and the length of the string is determined by
> /// calling getByteLength().  The C type for a string is always a
> /// ConstantArrayType.
>
> This means that using strlen(StringLiteral::getStrData()) is not safe; it
> will just march off the end of the literal until it hits the first null
> character that lies on the heap.
>
> On Nov 11, 2008, at 6:02 PM, Zhongxing Xu wrote:
>
> Did you use the fixed version? My observasion is that sometimes
> strlen(StringLiteral::getStrData()) is different from
> StringLiteral::getByteLength().
>
> On Tue, Nov 11, 2008 at 11:47 PM, Nuno Lopes <nunoplopes at sapo.pt> wrote:
>
>> Here it works just fine. But my system's default charset is latin0
>> (similar with latin1).
>> Nuno
>>
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081112/5a94d735/attachment.html>


More information about the cfe-dev mailing list