[cfe-commits] r41055 - /cfe/trunk/include/clang/AST/Expr.h
Ted Kremenek
kremenek at apple.com
Mon Aug 13 15:26:47 PDT 2007
Author: kremenek
Date: Mon Aug 13 17:26:47 2007
New Revision: 41055
URL: http://llvm.org/viewvc/llvm-project?rev=41055&view=rev
Log:
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().
Modified:
cfe/trunk/include/clang/AST/Expr.h
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=41055&r1=41054&r2=41055&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Mon Aug 13 17:26:47 2007
@@ -222,6 +222,10 @@
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;
More information about the cfe-commits
mailing list