summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-06-25 14:00:26 +0200
committerNoel Grandin <noel@peralex.com>2015-06-25 14:00:26 +0200
commitf53c186b8d2f5a13a3a644dbff7f21548c32c4d4 (patch)
tree515eb2113fd5b27f871f74074d9ad2abfa990798 /compilerplugins
parent38ea4f018e795aa2b191509d2c1f56b76191f079 (diff)
my previous fix triggered an assert in clang
Change-Id: I67b8dec0d49032134a1b588363e72fa88f5993f7
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/stringconstant.cxx2
1 files changed, 1 insertions, 1 deletions
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<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)"