diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-05-16 17:19:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-05-16 17:19:11 +0200 |
commit | 189c3a098e0ee5b64e2ab40c3980a2a654315468 (patch) | |
tree | d9a1147c3c0fe07ca75be0c4dcb6a4c5ca5b93e3 /compilerplugins/clang | |
parent | e85fcef1af0c96b0e8334bd7b6256e0b02810e43 (diff) |
Extend loplugin:comparisonwithconstant beyond integral types
Change-Id: Id3a8fd5d8b9975d3ae49af0648b39454310495fa
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r-- | compilerplugins/clang/comparisonwithconstant.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/comparisonwithconstant.cxx b/compilerplugins/clang/comparisonwithconstant.cxx index c0fe91f9508c..cf721a83c4e3 100644 --- a/compilerplugins/clang/comparisonwithconstant.cxx +++ b/compilerplugins/clang/comparisonwithconstant.cxx @@ -58,10 +58,10 @@ bool ComparisonWithConstant::VisitBinaryOperator(const BinaryOperator* binaryOp) return true; } APValue result; - if (!binaryOp->getLHS()->isIntegerConstantExpr(compiler.getASTContext())) { + if (!binaryOp->getLHS()->isEvaluatable(compiler.getASTContext())) { return true; } - if (binaryOp->getRHS()->isIntegerConstantExpr(compiler.getASTContext())) { + if (binaryOp->getRHS()->isEvaluatable(compiler.getASTContext())) { return true; } if (!rewrite(binaryOp)) |