File tree 6 files changed +9
-9
lines changed
6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ std::string resolve(std::string Path) {
82
82
log (" Failed to resolve possible symlink {0}" , Path);
83
83
return Path;
84
84
}
85
- return std::string (Resolved. str () );
85
+ return std::string (Resolved);
86
86
}
87
87
88
88
// Get a plausible full `clang` path.
@@ -114,7 +114,7 @@ std::string detectClangPath() {
114
114
SmallString<128 > ClangPath;
115
115
ClangPath = llvm::sys::path::parent_path (ClangdExecutable);
116
116
llvm::sys::path::append (ClangPath, " clang" );
117
- return std::string (ClangPath. str () );
117
+ return std::string (ClangPath);
118
118
}
119
119
120
120
// On mac, /usr/bin/clang sets SDKROOT and then invokes the real clang.
Original file line number Diff line number Diff line change @@ -663,7 +663,7 @@ static void fillNonLocationData(DiagnosticsEngine::Level DiagLevel,
663
663
llvm::SmallString<64 > Message;
664
664
Info.FormatDiagnostic (Message);
665
665
666
- D.Message = std::string (Message. str () );
666
+ D.Message = std::string (Message);
667
667
D.Severity = DiagLevel;
668
668
D.Category = DiagnosticIDs::getCategoryNameFromID (
669
669
DiagnosticIDs::getCategoryNumberForDiag (Info.getID ()))
@@ -798,7 +798,7 @@ void StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
798
798
if (Message.empty ()) // either !SyntheticMessage, or we failed to make one.
799
799
Info.FormatDiagnostic (Message);
800
800
LastDiag->Fixes .push_back (
801
- Fix{std::string (Message. str () ), std::move (Edits), {}});
801
+ Fix{std::string (Message), std::move (Edits), {}});
802
802
return true ;
803
803
};
804
804
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ std::optional<OpaqueType> OpaqueType::encode(ASTContext &Ctx, QualType T) {
71
71
llvm::SmallString<128 > Encoded;
72
72
if (index ::generateUSRForType (QualType (C, 0 ), Ctx, Encoded))
73
73
return std::nullopt;
74
- return OpaqueType (std::string (Encoded. str () ));
74
+ return OpaqueType (std::string (Encoded));
75
75
}
76
76
77
77
OpaqueType::OpaqueType (std::string Data) : Data(std::move(Data)) {}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ PreambleFileStatusCache::PreambleFileStatusCache(llvm::StringRef MainFilePath){
20
20
assert (llvm::sys::path::is_absolute (MainFilePath));
21
21
llvm::SmallString<256 > MainFileCanonical (MainFilePath);
22
22
llvm::sys::path::remove_dots (MainFileCanonical, /* remove_dot_dot=*/ true );
23
- this ->MainFilePath = std::string (MainFileCanonical. str () );
23
+ this ->MainFilePath = std::string (MainFileCanonical);
24
24
}
25
25
26
26
void PreambleFileStatusCache::update (const llvm::vfs::FileSystem &FS,
Original file line number Diff line number Diff line change @@ -1619,7 +1619,7 @@ std::vector<SymbolDetails> getSymbolInfo(ParsedAST &AST, Position Pos) {
1619
1619
}
1620
1620
llvm::SmallString<32 > USR;
1621
1621
if (!index ::generateUSRForDecl (D, USR)) {
1622
- NewSymbol.USR = std::string (USR. str () );
1622
+ NewSymbol.USR = std::string (USR);
1623
1623
NewSymbol.ID = SymbolID (NewSymbol.USR );
1624
1624
}
1625
1625
if (const NamedDecl *Def = getDefinition (D))
@@ -1642,7 +1642,7 @@ std::vector<SymbolDetails> getSymbolInfo(ParsedAST &AST, Position Pos) {
1642
1642
llvm::SmallString<32 > USR;
1643
1643
if (!index ::generateUSRForMacro (NewMacro.name , M->Info ->getDefinitionLoc (),
1644
1644
SM, USR)) {
1645
- NewMacro.USR = std::string (USR. str () );
1645
+ NewMacro.USR = std::string (USR);
1646
1646
NewMacro.ID = SymbolID (NewMacro.USR );
1647
1647
}
1648
1648
Results.push_back (std::move (NewMacro));
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ std::string getShardPathFromFilePath(llvm::StringRef ShardRoot,
30
30
llvm::sys::path::append (ShardRootSS, llvm::sys::path::filename (FilePath) +
31
31
" ." + llvm::toHex (digest (FilePath)) +
32
32
" .idx" );
33
- return std::string (ShardRootSS. str () );
33
+ return std::string (ShardRootSS);
34
34
}
35
35
36
36
// Uses disk as a storage for index shards.
You can’t perform that action at this time.
0 commit comments