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>
This commit is contained in:
Stephan Bergmann
2020-01-29 13:26:26 +01:00
parent 3a10338f3c
commit ce1d8e20a7
14 changed files with 33 additions and 31 deletions

View File

@@ -340,7 +340,7 @@ void PluginHandler::HandleTranslationUnit( ASTContext& context )
bSkip = true;
}
if( modifyFile.empty())
modifyFile = name;
modifyFile = name.str();
// Check whether the modified file is in the wanted scope
if( scope == "mainfile" )
{