...in case this ever gets used with an unsigned APSInt of bitwidth < 7

Change-Id: Ic9436529321e523edd25d0f83ac09a0e22a44013
This commit is contained in:
Stephan Bergmann
2015-06-25 15:59:01 +02:00
parent a8cd99685a
commit d4ad86dac6

View File

@@ -1191,7 +1191,7 @@ void StringConstant::handleOUStringCtor(
&& e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr(
res, compiler.getASTContext()))
{
if (res.getSExtValue() > 0 && res.getSExtValue() <= 127) {
if (res.getZExtValue() > 0 && res.getZExtValue() <= 127) {
report(
DiagnosticsEngine::Warning,
("in call of %0, replace OUString constructed from a (non-NUL)"