Consider string literals as constant in isConstLiteral.

This commit is contained in:
LemonBoy 2016-10-18 22:44:48 +02:00
parent d852300b1e
commit 557a8bd756
2 changed files with 22 additions and 5 deletions

View file

@ -522,6 +522,10 @@ bool isConstLiteral(Expression *e) {
}
} break;
// isConst also returns 0 for string literals that are obviously constant.
case TOKstring:
return true;
default:
if (e->isConst() != 1)
return false;