diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-01-29 13:26:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-29 14:14:04 +0100 |
commit | ce1d8e20a708ed031f2336770a41fbe501fe8225 (patch) | |
tree | 2b9f2ea562a879da8722e5bddb2bac4488624b35 /compilerplugins/clang/useuniqueptr.cxx | |
parent | bInterim is always true (diff) | |
download | core-ce1d8e20a708ed031f2336770a41fbe501fe8225.tar.gz core-ce1d8e20a708ed031f2336770a41fbe501fe8225.zip |
Adapt to "[ADT] Make StringRef's std::string conversion operator explicit"
...<https://github.com/llvm/llvm-project/commit/
777180a32b61070a10dd330b4f038bf24e916af1>. This is just a quick fix to get
copmilerplugins buiding again with latest LLVM/Clang trunk. Ideally, we should
get rid of as many of those (potentially expensive) conversions from
llvm::StringRef to std::string as possible.
Change-Id: I18e185e0022a06fd8e3b983a3c4f80e1f3b96746
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87682
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/useuniqueptr.cxx')
-rw-r--r-- | compilerplugins/clang/useuniqueptr.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx index ad8f43132eaa..d0156cac44bb 100644 --- a/compilerplugins/clang/useuniqueptr.cxx +++ b/compilerplugins/clang/useuniqueptr.cxx @@ -32,7 +32,7 @@ public: virtual void run() override { - fn = handler.getMainFileName(); + fn = handler.getMainFileName().str(); loplugin::normalizeDotDotInFilePath(fn); // can't change these because we pass them down to the SfxItemPool stuff if (fn == SRCDIR "/sc/source/core/data/docpool.cxx") @@ -500,16 +500,16 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C if (parentName == "ScBroadcastAreaSlot") return; // complicated - if (any_equal(parentName, "SwFormatField", "FontPropertyBox", "SdFontPropertyBox", + if (any_equal(parentName.str(), "SwFormatField", "FontPropertyBox", "SdFontPropertyBox", "SwHTMLParser", "PDFWriterImpl", "SbiParser", "DictionaryList", "SwGlossaryHdl", "SwGlossaryGroupDlg")) return; // ok - if (any_equal(parentName, "SbTreeListBox")) + if (any_equal(parentName.str(), "SbTreeListBox")) return; if (functionDecl->getIdentifier()) { - std::string name = functionDecl->getName(); + std::string name = functionDecl->getName().str(); if (!parentName.empty()) name = std::string(parentName) + "::" + name; |