summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-26 13:51:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-26 13:55:30 +0200
commit8fd802eb33e1df5e2445acda6c7a3fa862162fa0 (patch)
treedf1b39084f136b2d00c4eeb7fa7da47e5eb46428 /compilerplugins
parentedc96a157e3ab8b54046ee28df947a43330d3d3f (diff)
loplugin:stringconstant: OUStringLiteral1 can handle NUL literals just fine
Change-Id: I9b31b01a34a10d5bd329dccd39da83500d6fd2c7
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/stringconstant.cxx6
1 files 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();
}