Fix display of default keyword in switch statement as a Label

Task-number: QTCREATORBUG-7172
Change-Id: I08a89cbef183e33300f72ea8cc2c0da9a23c5413
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
David Schulz
2012-08-15 14:43:35 +02:00
committed by Leandro Melo
parent 0198d16146
commit 0fcf5515e5

View File

@@ -953,7 +953,7 @@ bool CheckSymbols::visit(GotoStatementAST *ast)
bool CheckSymbols::visit(LabeledStatementAST *ast)
{
if (ast->label_token)
if (ast->label_token && !tokenAt(ast->label_token).isKeyword())
addUse(ast->label_token, SemanticInfo::LabelUse);
accept(ast->statement);