Commit 2103e08b authored by Mikael Holmén's avatar Mikael Holmén
Browse files

More fixes of implicit std::string conversions

parent 323bfde2
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ genStylesheetsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
                            llvm::sys::path::filename(FilePath));
    // Paths in HTML must be in posix-style
    llvm::sys::path::native(StylesheetPath, llvm::sys::path::Style::posix);
    LinkNode->Attributes.emplace_back("href", StylesheetPath.str());
    LinkNode->Attributes.emplace_back("href", std::string(StylesheetPath.str()));
    Out.emplace_back(std::move(LinkNode));
  }
  return Out;
@@ -293,7 +293,7 @@ genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
    llvm::sys::path::append(ScriptPath, llvm::sys::path::filename(FilePath));
    // Paths in HTML must be in posix-style
    llvm::sys::path::native(ScriptPath, llvm::sys::path::Style::posix);
    ScriptNode->Attributes.emplace_back("src", ScriptPath.str());
    ScriptNode->Attributes.emplace_back("src", std::string(ScriptPath.str()));
    Out.emplace_back(std::move(ScriptNode));
  }
  return Out;
@@ -422,7 +422,7 @@ genReferencesBlock(const std::vector<Reference> &References,

  std::vector<std::unique_ptr<TagNode>> Out;
  Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_H2, Title));
  Out.back()->Attributes.emplace_back("id", Title);
  Out.back()->Attributes.emplace_back("id", std::string(Title));
  Out.emplace_back(std::make_unique<TagNode>(HTMLTag::TAG_UL));
  auto &ULBody = Out.back();
  for (const auto &R : References) {
@@ -454,7 +454,7 @@ writeFileDefinition(const Location &L,
  Node->Children.emplace_back(std::make_unique<TextNode>(" of file "));
  auto LocFileNode = std::make_unique<TagNode>(
      HTMLTag::TAG_A, llvm::sys::path::filename(FileURL));
  LocFileNode->Attributes.emplace_back("href", FileURL.str());
  LocFileNode->Attributes.emplace_back("href", std::string(FileURL.str()));
  Node->Children.emplace_back(std::move(LocFileNode));
  return Node;
}
@@ -502,7 +502,7 @@ static std::unique_ptr<TagNode> genInfoFileMainNode(

  auto LeftSidebarNode = std::make_unique<TagNode>(HTMLTag::TAG_DIV);
  LeftSidebarNode->Attributes.emplace_back("id", "sidebar-left");
  LeftSidebarNode->Attributes.emplace_back("path", InfoPath);
  LeftSidebarNode->Attributes.emplace_back("path", std::string(InfoPath));
  LeftSidebarNode->Attributes.emplace_back(
      "class", "col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left");

+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ static CheckersList getAnalyzerCheckersAndPackages(ClangTidyContext &Context,

    if (CheckName.startswith("core") ||
        Context.isCheckEnabled(ClangTidyCheckName)) {
      List.emplace_back(CheckName, true);
      List.emplace_back(std::string(CheckName), true);
    }
  }
  return List;
+1 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ void SpecialMemberFunctionsCheck::check(
  if (!MatchedDecl)
    return;

  ClassDefId ID(MatchedDecl->getLocation(), MatchedDecl->getName());
  ClassDefId ID(MatchedDecl->getLocation(), std::string(MatchedDecl->getName()));

  auto StoreMember = [this, &ID](SpecialMemberFunctionKind Kind) {
    llvm::SmallVectorImpl<SpecialMemberFunctionKind> &Members =
+2 −2
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@ void RenamerClangTidyCheck::checkMacro(SourceManager &SourceMgr,
    return;
  FailureInfo &Info = *MaybeFailure;
  StringRef Name = MacroNameTok.getIdentifierInfo()->getName();
  NamingCheckId ID(MI->getDefinitionLoc(), Name);
  NamingCheckId ID(MI->getDefinitionLoc(), std::string(Name));
  NamingCheckFailure &Failure = NamingCheckFailures[ID];
  SourceRange Range(MacroNameTok.getLocation(), MacroNameTok.getEndLoc());

@@ -351,7 +351,7 @@ void RenamerClangTidyCheck::checkMacro(SourceManager &SourceMgr,
void RenamerClangTidyCheck::expandMacro(const Token &MacroNameTok,
                                        const MacroInfo *MI) {
  StringRef Name = MacroNameTok.getIdentifierInfo()->getName();
  NamingCheckId ID(MI->getDefinitionLoc(), Name);
  NamingCheckId ID(MI->getDefinitionLoc(), std::string(Name));

  auto Failure = NamingCheckFailures.find(ID);
  if (Failure == NamingCheckFailures.end())