From 0c82dff153d92150729815b919854a9a350aa031 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 Apr 2017 15:16:47 +0200 Subject: loplugin:singlevalfields Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1 Reviewed-on: https://gerrit.libreoffice.org/36145 Tested-by: Jenkins Reviewed-by: Noel Grandin --- compilerplugins/clang/singlevalfields.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/singlevalfields.cxx b/compilerplugins/clang/singlevalfields.cxx index c858954745f9..e096b7f96178 100644 --- a/compilerplugins/clang/singlevalfields.cxx +++ b/compilerplugins/clang/singlevalfields.cxx @@ -465,21 +465,16 @@ std::string SingleValFields::getExprValue(const Expr* arg) if (!arg) return "?"; arg = arg->IgnoreParenCasts(); - // workaround bug in clang - if (isa(arg)) - return "?"; // ignore this, it seems to trigger an infinite recursion - if (isa(arg)) { + if (isa(arg)) + return "?"; + if (arg->isValueDependent()) return "?"; - } APSInt x1; if (arg->EvaluateAsInt(x1, compiler.getASTContext())) - { return x1.toString(10); - } - if (isa(arg)) { + if (isa(arg)) return "0"; - } return "?"; } -- cgit v1.2.3