diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-24 21:52:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-24 21:52:14 +0000 |
commit | 3bf2878556b0813fe1c0f191d9ad9670beb4c7c4 (patch) | |
tree | 992b8edfe1b18f6986b319b1e9cc00f766229cf4 /clang | |
parent | 6fe4306195c06ad1b8bdf73ea626430d0cdea89a (diff) | |
download | bcm5719-llvm-3bf2878556b0813fe1c0f191d9ad9670beb4c7c4.tar.gz bcm5719-llvm-3bf2878556b0813fe1c0f191d9ad9670beb4c7c4.zip |
improve comments.
llvm-svn: 65388
Diffstat (limited to 'clang')
-rw-r--r-- | clang/include/clang/AST/Expr.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index cfd13b2fbbf..9e19940506e 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -479,11 +479,18 @@ public: /// 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. +/// ConstantArrayType. In C++, the char type is const qualified, in C it is +/// not. /// /// Note that strings in C can be formed by concatenation of multiple string /// literal pptokens in translation phase #6. This keeps track of the locations /// of each of these pieces. +/// +/// Strings in C can also be truncated and extended by assigning into arrays, +/// e.g. with constructs like: +/// char X[2] = "foobar"; +/// In this case, getByteLength() will return 6, but the string literal will +/// have type "char[2]". class StringLiteral : public Expr { const char *StrData; unsigned ByteLength; |