]> granicus.if.org Git - clang/commitdiff
Added documentation to StringLiteral noting that the strings returned by
authorTed Kremenek <kremenek@apple.com>
Mon, 13 Aug 2007 22:26:47 +0000 (22:26 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 13 Aug 2007 22:26:47 +0000 (22:26 +0000)
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

include/clang/AST/Expr.h

index dc70201b56cdb217d1b05d4fd63eb2a5b7d78cea..36005223c7e266e5bd751a6801a978eb60b2f74f 100644 (file)
@@ -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;