diff options
Diffstat (limited to 'src/xmlpatterns/parser')
-rw-r--r-- | src/xmlpatterns/parser/qquerytransformparser.cpp | 4 | ||||
-rw-r--r-- | src/xmlpatterns/parser/qtokenlookup.cpp | 2 | ||||
-rw-r--r-- | src/xmlpatterns/parser/qtokenrevealer.cpp | 1 | ||||
-rw-r--r-- | src/xmlpatterns/parser/querytransformparser.ypp | 4 | ||||
-rw-r--r-- | src/xmlpatterns/parser/qxquerytokenizer.cpp | 31 | ||||
-rw-r--r-- | src/xmlpatterns/parser/qxslttokenizer.cpp | 19 |
6 files changed, 9 insertions, 52 deletions
diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp index 73a3560..501a78b 100644 --- a/src/xmlpatterns/parser/qquerytransformparser.cpp +++ b/src/xmlpatterns/parser/qquerytransformparser.cpp @@ -977,7 +977,6 @@ static Expression::Ptr pushVariable(const QXmlName name, switch(type) { case VariableDeclaration::FunctionArgument: - /* Fallthrough. */ case VariableDeclaration::ExpressionVariable: { slot = parseInfo->allocateExpressionSlot(); @@ -7857,11 +7856,8 @@ QString Tokenizer::tokenToString(const Token &token) switch(token.type) { case T_NCNAME: - /* Fallthrough. */ case T_QNAME: - /* Fallthrough. */ case T_NUMBER: - /* Fallthrough. */ case T_XPATH2_NUMBER: return token.value; case T_STRING_LITERAL: diff --git a/src/xmlpatterns/parser/qtokenlookup.cpp b/src/xmlpatterns/parser/qtokenlookup.cpp index b3f36c9..54d53ac 100644 --- a/src/xmlpatterns/parser/qtokenlookup.cpp +++ b/src/xmlpatterns/parser/qtokenlookup.cpp @@ -134,7 +134,7 @@ TokenLookup::hash (const char *str, unsigned int len) { default: hval += asso_values[(unsigned char)str[2]]; - /*FALLTHROUGH*/ + Q_FALLTHROUGH(); case 2: case 1: hval += asso_values[(unsigned char)str[0]]; diff --git a/src/xmlpatterns/parser/qtokenrevealer.cpp b/src/xmlpatterns/parser/qtokenrevealer.cpp index 1c41484..486c40d 100644 --- a/src/xmlpatterns/parser/qtokenrevealer.cpp +++ b/src/xmlpatterns/parser/qtokenrevealer.cpp @@ -83,7 +83,6 @@ Tokenizer::Token TokenRevealer::nextToken(YYLTYPE *const sourceLocator) break; } case T_SEMI_COLON: - /* Fallthrough. */ case T_COMMA: { m_result += asString + QLatin1Char('\n') + m_indentationString; diff --git a/src/xmlpatterns/parser/querytransformparser.ypp b/src/xmlpatterns/parser/querytransformparser.ypp index 338bfe4..3a26b0d 100644 --- a/src/xmlpatterns/parser/querytransformparser.ypp +++ b/src/xmlpatterns/parser/querytransformparser.ypp @@ -906,7 +906,6 @@ static Expression::Ptr pushVariable(const QXmlName name, switch(type) { case VariableDeclaration::FunctionArgument: - /* Fallthrough. */ case VariableDeclaration::ExpressionVariable: { slot = parseInfo->allocateExpressionSlot(); @@ -4648,11 +4647,8 @@ QString Tokenizer::tokenToString(const Token &token) switch(token.type) { case T_NCNAME: - /* Fallthrough. */ case T_QNAME: - /* Fallthrough. */ case T_NUMBER: - /* Fallthrough. */ case T_XPATH2_NUMBER: return token.value; case T_STRING_LITERAL: diff --git a/src/xmlpatterns/parser/qxquerytokenizer.cpp b/src/xmlpatterns/parser/qxquerytokenizer.cpp index 2d6b9ea..a88e2d1 100644 --- a/src/xmlpatterns/parser/qxquerytokenizer.cpp +++ b/src/xmlpatterns/parser/qxquerytokenizer.cpp @@ -105,7 +105,7 @@ int XQueryTokenizer::peekForColonColon() const { if (peekAhead((pos - m_pos) + 1) == ':') return pos - m_pos; - /* Fallthrough. */ + Q_FALLTHROUGH(); } default: return -1; @@ -167,7 +167,7 @@ QString XQueryTokenizer::normalizeEOL(const QString &input, if (i + 1 < len && input.at(i + 1) == QLatin1Char('\n')) ++i; - /* Else, fallthrough. */ + Q_FALLTHROUGH(); } case '\n': { @@ -223,7 +223,6 @@ Tokenizer::TokenType XQueryTokenizer::consumeComment() break; } case '\n': - /* Fallthrough. */ case '\r': { /* We want to count \r\n as a single line break. */ @@ -766,7 +765,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() switch(state()) { case XMLSpaceDecl: - /* Fallthrough. */ case NamespaceKeyword: { switch(peekCurrent()) @@ -774,7 +772,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() case ',': return tokenAndAdvance(T_COMMA); case '"': - /* Fallthrough. */ case '\'': { setState(NamespaceDecl); @@ -793,7 +790,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() switch(keyword->token) { case T_INHERIT: - /* Fallthrough. */ case T_NO_INHERIT: { setState(Default); @@ -805,9 +801,7 @@ Tokenizer::Token XQueryTokenizer::nextToken() break; } case T_ORDERED: - /* Fallthrough. */ case T_UNORDERED: - /* Fallthrough. */ case T_STRIP: { setState(Default); @@ -839,7 +833,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() case ';': return tokenAndChangeState(T_SEMI_COLON, Default); case '\'': - /* Fallthrough. */ case '\"': return tokenizeStringLiteral(); } @@ -867,15 +860,14 @@ Tokenizer::Token XQueryTokenizer::nextToken() setState(AfterAxisSeparator); return Token(T_COLONCOLON); } - /* Fallthrough. */ + Q_FALLTHROUGH(); } case AfterAxisSeparator: - /* Fallthrough. */ case Default: /* State Operator and state Default have a lot of tokens in common except * for minor differences. So we treat them the same way, and sprinkles logic * here and there to handle the small differences. */ - /* Fallthrough. */ + Q_FALLTHROUGH(); case Operator: { switch(peekCurrent()) @@ -930,7 +922,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return tokenAndChangeState(T_DOT, Operator); } case '\'': - /* Fallthrough. */ case '"': { setState(Operator); @@ -1293,7 +1284,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() switch(keyword2->token) { case T_VARIABLE: - /* Fallthrough. */ case T_FUNCTION: { m_tokenStack.push(Token(keyword2->token)); @@ -1307,7 +1297,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return Token(keyword->token); } case T_COPY_NAMESPACES: - /* Fallthrough. */ case T_ORDERING: { m_tokenStack.push(Token(keyword2->token)); @@ -1322,7 +1311,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return Token(keyword->token); } case T_NAMESPACE: - /* Fallthrough. */ case T_BASEURI: { m_tokenStack.push(Token(keyword2->token)); @@ -1402,7 +1390,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() switch(keyword2->token) { case T_SCHEMA: - /* Fallthrough. */ case T_MODULE: { setState(NamespaceKeyword); @@ -1509,7 +1496,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() case '?': return tokenAndAdvance(T_QUESTION); case '\'': - /* Fallthrough. */ case '"': return tokenizeStringLiteral(); } @@ -1547,7 +1533,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() return tokenAndAdvance(T_RPAREN); } case '\'': - /* Fallthrough. */ case '"': return tokenizeStringLiteral(); default: @@ -1578,7 +1563,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() switch(peekCurrent()) { case '\'': - /* Fallthrough. */ case '"': return tokenizeStringLiteral(); case ';': @@ -1648,7 +1632,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() Q_ASSERT(false); } case AposAttributeContent: - /* Fallthrough. */ case QuotAttributeContent: { const QChar sep(state() == AposAttributeContent ? QLatin1Char('\'') : QLatin1Char('"')); @@ -1770,7 +1753,6 @@ Tokenizer::Token XQueryTokenizer::nextToken() Q_FALLTHROUGH(); } case 0xA: - /* Fallthrough. */ case 0x9: { result.append(QLatin1Char(' ')); @@ -1921,7 +1903,7 @@ Tokenizer::Token XQueryTokenizer::nextToken() /* We want to translate \r\n into \n. */ if (peekAhead(-1) == '\r') break; - /* else, fallthrough. */ + Q_FALLTHROUGH(); } case '\r': { @@ -2192,9 +2174,7 @@ Tokenizer::Token XQueryTokenizer::nextToken(YYLTYPE *const sourceLocator) switch(retval.type) { case T_MODULE: - /* Fallthrough.*/ case T_SCHEMA: - /* Fallthrough.*/ case T_COPY_NAMESPACES: { setState(NamespaceKeyword); @@ -2206,7 +2186,6 @@ Tokenizer::Token XQueryTokenizer::nextToken(YYLTYPE *const sourceLocator) break; } case T_AS: - /* Fallthrough. */ case T_OF: { setState(ItemType); diff --git a/src/xmlpatterns/parser/qxslttokenizer.cpp b/src/xmlpatterns/parser/qxslttokenizer.cpp index f878e72..38e0374 100644 --- a/src/xmlpatterns/parser/qxslttokenizer.cpp +++ b/src/xmlpatterns/parser/qxslttokenizer.cpp @@ -562,7 +562,6 @@ QString XSLTTokenizer::readElementText() continue; } case QXmlStreamReader::Comment: - /* Fallthrough. */ case QXmlStreamReader::ProcessingInstruction: continue; case QXmlStreamReader::EndElement: @@ -718,11 +717,8 @@ void XSLTTokenizer::handleStandardAttributes(const bool isXSLTElement) switch(toToken(att.name())) { case Type: - /* Fallthrough. */ case Validation: - /* Fallthrough. */ case UseAttributeSets: - /* Fallthrough. */ case Version: /* These are handled by other function such as * handleValidationAttributes() and handleXSLTVersion(). */ @@ -1236,7 +1232,6 @@ void XSLTTokenizer::insideChoose(TokenSource::Queue *const to) break; } case QXmlStreamReader::Comment: - /* Fallthrough. */ case QXmlStreamReader::ProcessingInstruction: continue; case QXmlStreamReader::Characters: @@ -1245,10 +1240,9 @@ void XSLTTokenizer::insideChoose(TokenSource::Queue *const to) * 4.2 Stripping Whitespace from the Stylesheet. */ if(isWhitespace()) continue; - /* Fallthrough. */ + Q_FALLTHROUGH(); } default: - /* Fallthrough. */ unexpectedContent(); break; } @@ -2071,7 +2065,6 @@ bool XSLTTokenizer::insideSequenceConstructor(TokenSource::Queue *const to, return hasWrittenExpression; } case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: /* We do nothing, we just ignore them. */ continue; @@ -2162,7 +2155,6 @@ void XSLTTokenizer::queueWithParams(const XSLTTokenLookup::NodeName parentName, continue; } case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: continue; case QXmlStreamReader::Characters: @@ -2241,7 +2233,7 @@ void XSLTTokenizer::queueParams(const XSLTTokenLookup::NodeName parentName, { if(whitespaceToSkip()) continue; - /* Fallthrough. */ + Q_FALLTHROUGH(); } case QXmlStreamReader::EndElement: return; @@ -2327,13 +2319,12 @@ void XSLTTokenizer::insideAttributeSet() case QXmlStreamReader::EndElement: return; case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: continue; case QXmlStreamReader::Characters: if(whitespaceToSkip()) continue; - /* Fallthrough. */ + Q_FALLTHROUGH(); default: unexpectedContent(); } @@ -2384,7 +2375,6 @@ void XSLTTokenizer::insideStylesheetModule() break; } case StripSpace: - /* Fallthrough. */ case PreserveSpace: { // TODO @elements @@ -2532,9 +2522,7 @@ void XSLTTokenizer::queueSorting(const bool oneSortRequired, switch(currentElementName()) { case PerformSort: - /* Fallthrough. */ case ForEach: - /* Fallthrough. */ case ApplyTemplates: return; default: @@ -2645,7 +2633,6 @@ void XSLTTokenizer::queueSorting(const bool oneSortRequired, break; } case QXmlStreamReader::ProcessingInstruction: - /* Fallthrough. */ case QXmlStreamReader::Comment: continue; default: |