summaryrefslogtreecommitdiff
path: root/src/libs/3rdparty
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2017-09-25 11:00:25 +0200
committerEike Ziller <eike.ziller@qt.io>2017-09-25 11:00:25 +0200
commitcfdea6b9c21a01bef9e73b23ad99a020ed2e0721 (patch)
tree4aff97b7d53cba52df60b22853f47e0f7e3f7685 /src/libs/3rdparty
parent75f13f200b9930fb0da0384f6364a703a3ce7e9f (diff)
parent846d89811a72f96909ad137fb973983f568c3643 (diff)
downloadqt-creator-cfdea6b9c21a01bef9e73b23ad99a020ed2e0721.tar.gz
Merge remote-tracking branch 'origin/4.4'
Change-Id: I7bf72444b19db20fcc7dc2c9d1f02ec2b30b658f
Diffstat (limited to 'src/libs/3rdparty')
-rw-r--r--src/libs/3rdparty/cplusplus/Lexer.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp
index e62c9412a4..079ae0ca6e 100644
--- a/src/libs/3rdparty/cplusplus/Lexer.cpp
+++ b/src/libs/3rdparty/cplusplus/Lexer.cpp
@@ -211,7 +211,7 @@ void Lexer::scan_helper(Token *tok)
_state = 0;
scanCppComment(originalKind);
return;
- } else if (isRawStringLiteral(s._tokenKind)) {
+ } else if (!control() && isRawStringLiteral(s._tokenKind)) {
tok->f.kind = s._tokenKind;
if (scanUntilRawStringLiteralEndSimple())
_state = 0;
@@ -755,13 +755,17 @@ void Lexer::scanRawStringLiteral(Token *tok, unsigned char hint)
yyinp();
} else if (_yychar == ')') {
yyinp();
- if (delimLength == -1)
- break;
+ if (delimLength == -1) {
+ tok->f.kind = T_ERROR;
+ return;
+ }
closingDelimCandidate = _currentChar;
} else {
if (delimLength == -1) {
- if (_yychar == '\\' || std::isspace(_yychar))
- break;
+ if (_yychar == '\\' || std::isspace(_yychar)) {
+ tok->f.kind = T_ERROR;
+ return;
+ }
yyinp();
} else {
if (!closingDelimCandidate) {
@@ -804,7 +808,7 @@ void Lexer::scanRawStringLiteral(Token *tok, unsigned char hint)
else
tok->f.kind = T_RAW_STRING_LITERAL;
- if (!closed)
+ if (!control() && !closed)
s._tokenKind = tok->f.kind;
}