From 8fd802eb33e1df5e2445acda6c7a3fa862162fa0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 26 Jun 2015 13:51:13 +0200 Subject: [PATCH] loplugin:stringconstant: OUStringLiteral1 can handle NUL literals just fine Change-Id: I9b31b01a34a10d5bd329dccd39da83500d6fd2c7 --- compilerplugins/clang/stringconstant.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index 1280ce121691..7522641ef0b7 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -1191,11 +1191,11 @@ void StringConstant::handleOUStringCtor( && e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr( res, compiler.getASTContext())) { - if (res.getZExtValue() > 0 && res.getZExtValue() <= 127) { + if (res.getZExtValue() <= 127) { report( DiagnosticsEngine::Warning, - ("in call of %0, replace OUString constructed from a (non-NUL)" - " ASCII char constant with a string literal"), + ("in call of %0, replace OUString constructed from an ASCII" + " char constant with a string literal"), e3->getExprLoc()) << qname << expr->getSourceRange(); }