summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-19 16:39:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-23 11:04:42 +0200
commitbd6fb0cd3eee3c7d414e55a7678c0097aadc7646 (patch)
tree5f754d7e485ab31dd4e04782b8eccd50d854d91e /compilerplugins
parent3501c52176d1122d9de08462435f633cd21de370 (diff)
Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String
...in include files. This is a mix of automatic rewriting in include files and manual fixups (mostly addressing loplugin:redundantfcast) in source files that include those. Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/ostr.cxx8
1 files changed, 0 insertions, 8 deletions
diff --git a/compilerplugins/clang/ostr.cxx b/compilerplugins/clang/ostr.cxx
index 9675913c8576..d0290aad1f90 100644
--- a/compilerplugins/clang/ostr.cxx
+++ b/compilerplugins/clang/ostr.cxx
@@ -46,14 +46,6 @@ public:
= bool(loplugin::TypeCheck(i.first->getType()).Class("OUStringLiteral"));
if (i.second.singleUse == nullptr)
{
- if (!(i.first->getDeclContext()->isFunctionOrMethod()
- || compiler.getSourceManager().isInMainFile(i.first->getLocation())
- || compiler.getDiagnosticOpts().VerifyDiagnostics))
- {
- //TODO, rewriting these in include files could trigger
- // loplugin:redundantfcast in other translation units:
- continue;
- }
if (rewriter != nullptr)
{
auto e = i.first->getInit()->IgnoreParenImpCasts();