diff options
Diffstat (limited to 'compilerplugins/clang/bufferadd.cxx')
-rw-r--r-- | compilerplugins/clang/bufferadd.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compilerplugins/clang/bufferadd.cxx b/compilerplugins/clang/bufferadd.cxx index bc8c7065b2a1..cf2b6a011b4a 100644 --- a/compilerplugins/clang/bufferadd.cxx +++ b/compilerplugins/clang/bufferadd.cxx @@ -347,6 +347,15 @@ bool BufferAdd::isSideEffectFree(Expr const* expr) if (isSideEffectFree(callExpr->getArg(0))) return true; } + // O[U]String::operator std::[u16]string_view: + if (auto const d = dyn_cast_or_null<CXXConversionDecl>(callExpr->getCalleeDecl())) + { + auto tc = loplugin::TypeCheck(d->getParent()); + if (tc.Class("OString") || tc.Class("OUString")) + { + return true; + } + } } // sometimes we have a constructor call on the RHS |