From: Ted Kremenek Date: Mon, 13 Aug 2007 22:26:47 +0000 (+0000) Subject: Added documentation to StringLiteral noting that the strings returned by X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6a82b2c29ad05534841e5f8fd033fb17b6f61e2;p=clang Added documentation to StringLiteral noting that the strings returned by getStrData() are not null-terminated, and the lengths of these strings should be determined using getByteLength(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41055 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index dc70201b56..36005223c7 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -222,6 +222,10 @@ public: static bool classof(const FloatingLiteral *) { return true; } }; +/// 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(). class StringLiteral : public Expr { const char *StrData; unsigned ByteLength;