summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/tokenizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qdoc/tokenizer.cpp')
-rw-r--r--src/tools/qdoc/tokenizer.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/qdoc/tokenizer.cpp b/src/tools/qdoc/tokenizer.cpp
index 69f2dafc398..29ce322cc9f 100644
--- a/src/tools/qdoc/tokenizer.cpp
+++ b/src/tools/qdoc/tokenizer.cpp
@@ -244,6 +244,13 @@ int Tokenizer::getToken()
}
case '\'':
yyCh = getChar();
+ /*
+ Allow empty character literal. QTBUG-25775
+ */
+ if (yyCh == '\'') {
+ yyCh = getChar();
+ break;
+ }
if (yyCh == '\\')
yyCh = getChar();
do {
@@ -251,8 +258,7 @@ int Tokenizer::getToken()
} while (yyCh != EOF && yyCh != '\'');
if (yyCh == EOF) {
- yyTokLoc.warning(tr("Unterminated C++ character"
- " literal"));
+ yyTokLoc.warning(tr("Unterminated C++ character literal"));
}
else {
yyCh = getChar();