compilerplugins/clang/constantfunction.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 44753f7cf05f502e566fe97231883a047d1f120a Author: Stephan Bergmann <[email protected]> Date: Wed Mar 25 21:37:48 2015 +0100 Expr::EvaluateAs... does not work for type-dependent expressions Change-Id: Iea1cd468528d00ffa07e13b2063ca5fce5cc4fae diff --git a/compilerplugins/clang/constantfunction.cxx b/compilerplugins/clang/constantfunction.cxx index 49a2c10..c3cd2b4 100644 --- a/compilerplugins/clang/constantfunction.cxx +++ b/compilerplugins/clang/constantfunction.cxx @@ -450,8 +450,9 @@ bool ConstantFunction::VisitFunctionDecl(const FunctionDecl * pFunctionDecl) { // && !pReturnStmt->getRetValue()->isEvaluatable(compiler.getASTContext())) { bool aBoolResult; llvm::APSInt aIntResult; - if (!pReturnStmt->getRetValue()->EvaluateAsBooleanCondition(aBoolResult, compiler.getASTContext()) - && !pReturnStmt->getRetValue()->EvaluateAsInt(aIntResult, compiler.getASTContext())) + if (pReturnStmt->getRetValue()->isTypeDependent() + || (!pReturnStmt->getRetValue()->EvaluateAsBooleanCondition(aBoolResult, compiler.getASTContext()) + && !pReturnStmt->getRetValue()->EvaluateAsInt(aIntResult, compiler.getASTContext()))) { return true; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
