mirror of
https://github.com/LibreOffice/core.git
synced 2025-08-15 20:47:46 +00:00
Don't call isIntegerConstantExpr on value dependent Expr
...as it causes Clang to fail with > Assertion failed: (!isValueDependent() && "Expression evaluator can't be called on a dependent expression."), function isIntegerConstantExpr, file .../llvm/llvm-project/clang/lib/AST/ExprConstant.cpp, line 15487. Change-Id: I335f7610955c30a5c102bfb3b8aa6441a30dd247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@ -131,7 +131,7 @@ public:
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (e2->isIntegerConstantExpr(compiler.getASTContext()))
|
||||
if (!e2->isValueDependent() && e2->isIntegerConstantExpr(compiler.getASTContext()))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -11,8 +11,9 @@
|
||||
|
||||
#include "rtl/ustring.hxx"
|
||||
|
||||
OUString f(sal_Unicode c, int n)
|
||||
template <sal_Unicode C> OUString f(sal_Unicode c, int n)
|
||||
{
|
||||
OUString s0(C);
|
||||
OUString s1(c);
|
||||
// expected-note@+1 {{literal 'rtl::OUString' variable defined here [loplugin:elidestringvar]}}
|
||||
OUString s2('a');
|
||||
@ -23,6 +24,8 @@ OUString f(sal_Unicode c, int n)
|
||||
OUString s4 = s4lit;
|
||||
switch (n)
|
||||
{
|
||||
case 0:
|
||||
return s0;
|
||||
case 1:
|
||||
return s1;
|
||||
case 2:
|
||||
|
Reference in New Issue
Block a user