summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex/LiteralSupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Lex/LiteralSupport.h')
-rw-r--r--include/clang/Lex/LiteralSupport.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/clang/Lex/LiteralSupport.h b/include/clang/Lex/LiteralSupport.h
index dcaf445..ec3d9c5 100644
--- a/include/clang/Lex/LiteralSupport.h
+++ b/include/clang/Lex/LiteralSupport.h
@@ -156,7 +156,9 @@ public:
StringLiteralParser(const Token *StringToks, unsigned NumStringToks,
const SourceManager &sm, const LangOptions &features,
const TargetInfo &target, Diagnostic *diags = 0)
- : SM(sm), Features(features), Target(target), Diags(diags) {
+ : SM(sm), Features(features), Target(target), Diags(diags),
+ MaxTokenLength(0), SizeBound(0), wchar_tByteWidth(0),
+ ResultPtr(ResultBuf.data()), hadError(false), AnyWide(false), Pascal(false) {
init(StringToks, NumStringToks);
}
@@ -165,8 +167,8 @@ public:
bool AnyWide;
bool Pascal;
- const char *GetString() { return &ResultBuf[0]; }
- unsigned GetStringLength() const { return ResultPtr-&ResultBuf[0]; }
+ const char *GetString() { return ResultBuf.data(); }
+ unsigned GetStringLength() const { return ResultPtr-ResultBuf.data(); }
unsigned GetNumStringChars() const {
if (AnyWide)
OpenPOWER on IntegriCloud