loplugin:stringconstant: Also handle u8"..." strings

(just in case)

Change-Id: Id8ce7436bacba874d9bc04915e42622e3cfca67a
This commit is contained in:
Stephan Bergmann
2017-09-27 07:52:11 +02:00
parent 9444671f1e
commit f79123a823
2 changed files with 3 additions and 1 deletions

View File

@@ -1163,7 +1163,7 @@ bool StringConstant::isStringConstant(
}
clang::StringLiteral const * lit = dyn_cast<clang::StringLiteral>(expr);
if (lit != nullptr) {
if (!lit->isAscii()) {
if (!(lit->isAscii() || lit->isUTF8())) {
return false;
}
unsigned n = lit->getLength();