my previous fix triggered an assert in clang

Change-Id: I67b8dec0d49032134a1b588363e72fa88f5993f7
This commit is contained in:
Noel Grandin
2015-06-25 14:00:26 +02:00
parent 38ea4f018e
commit f53c186b8d

View File

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