From f53c186b8d2f5a13a3a644dbff7f21548c32c4d4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 25 Jun 2015 14:00:26 +0200 Subject: [PATCH] my previous fix triggered an assert in clang Change-Id: I67b8dec0d49032134a1b588363e72fa88f5993f7 --- compilerplugins/clang/stringconstant.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index 5ffec1b21114..20ff2a996cce 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -1191,7 +1191,7 @@ void StringConstant::handleOUStringCtor( && e3->getArg(0)->IgnoreParenImpCasts()->isIntegerConstantExpr( res, compiler.getASTContext())) { - if (res > static_cast(0) && res <= static_cast(127)) { + if (res.getSExtValue() > 0 && res.getSExtValue() <= 127) { report( DiagnosticsEngine::Warning, ("in call of %0, replace OUString constructed from a (non-NUL)"