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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/Lex/LiteralSupport.h b/include/clang/Lex/LiteralSupport.h
index ec3d9c5..0dbcd6d 100644
--- a/include/clang/Lex/LiteralSupport.h
+++ b/include/clang/Lex/LiteralSupport.h
@@ -167,7 +167,9 @@ public:
bool AnyWide;
bool Pascal;
- const char *GetString() { return ResultBuf.data(); }
+ llvm::StringRef GetString() const {
+ return llvm::StringRef(ResultBuf.data(), GetStringLength());
+ }
unsigned GetStringLength() const { return ResultPtr-ResultBuf.data(); }
unsigned GetNumStringChars() const {
OpenPOWER on IntegriCloud