Skip to content

Commit aabe58f

Browse files
authored
Merge LLVM and SPIR-V translator pulldown #1105
LLVM: 67905fc SPIRV-LLVM-Translator: e980e04
2 parents 4d3d596 + 4d3ed81 commit aabe58f

File tree

6,428 files changed

+266394
-79397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,428 files changed

+266394
-79397
lines changed

.arcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"phabricator.uri" : "https://reviews.llvm.org/",
23
"repository.callsign" : "G",
34
"conduit_uri" : "https://reviews.llvm.org/"
45
}

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ CheckOptions:
1414
value: CamelCase
1515
- key: readability-identifier-naming.VariableCase
1616
value: CamelCase
17+
- key: readability-identifier-naming.IgnoreMainLikeFunctions
18+
value: 1
1719

clang-tools-extra/CODE_OWNERS.TXT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ D: clang-tidy
2323
N: Julie Hockett
2424
2525
D: clang-doc
26+
27+
N: Sam McCall
28+
29+
D: clangd

clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ inline std::string
2323
joinNamespaces(const llvm::SmallVectorImpl<StringRef> &Namespaces) {
2424
if (Namespaces.empty())
2525
return "";
26-
std::string Result = Namespaces.front();
26+
std::string Result(Namespaces.front());
2727
for (auto I = Namespaces.begin() + 1, E = Namespaces.end(); I != E; ++I)
2828
Result += ("::" + *I).str();
2929
return Result;
@@ -184,7 +184,7 @@ void addReplacementOrDie(
184184
const SourceManager &SM,
185185
std::map<std::string, tooling::Replacements> *FileToReplacements) {
186186
const auto R = createReplacement(Start, End, ReplacementText, SM);
187-
auto Err = (*FileToReplacements)[R.getFilePath()].add(R);
187+
auto Err = (*FileToReplacements)[std::string(R.getFilePath())].add(R);
188188
if (Err)
189189
llvm_unreachable(llvm::toString(std::move(Err)).c_str());
190190
}
@@ -213,18 +213,18 @@ std::string getShortestQualifiedNameInNamespace(llvm::StringRef DeclName,
213213
DeclName = DeclName.ltrim(':');
214214
NsName = NsName.ltrim(':');
215215
if (DeclName.find(':') == llvm::StringRef::npos)
216-
return DeclName;
216+
return std::string(DeclName);
217217

218218
auto NsNameSplitted = splitSymbolName(NsName);
219219
auto DeclNsSplitted = splitSymbolName(DeclName);
220220
llvm::StringRef UnqualifiedDeclName = DeclNsSplitted.pop_back_val();
221221
// If the Decl is in global namespace, there is no need to shorten it.
222222
if (DeclNsSplitted.empty())
223-
return UnqualifiedDeclName;
223+
return std::string(UnqualifiedDeclName);
224224
// If NsName is the global namespace, we can simply use the DeclName sans
225225
// leading "::".
226226
if (NsNameSplitted.empty())
227-
return DeclName;
227+
return std::string(DeclName);
228228

229229
if (NsNameSplitted.front() != DeclNsSplitted.front()) {
230230
// The DeclName must be fully-qualified, but we still need to decide if a
@@ -233,7 +233,7 @@ std::string getShortestQualifiedNameInNamespace(llvm::StringRef DeclName,
233233
// to avoid conflict.
234234
if (llvm::is_contained(NsNameSplitted, DeclNsSplitted.front()))
235235
return ("::" + DeclName).str();
236-
return DeclName;
236+
return std::string(DeclName);
237237
}
238238
// Since there is already an overlap namespace, we know that `DeclName` can be
239239
// shortened, so we reduce the longest common prefix.
@@ -711,7 +711,7 @@ void ChangeNamespaceTool::moveOldNamespace(
711711
MoveNs.InsertionOffset = SM.getFileOffset(SM.getSpellingLoc(InsertionLoc));
712712
MoveNs.FID = SM.getFileID(Start);
713713
MoveNs.SourceMgr = Result.SourceManager;
714-
MoveNamespaces[SM.getFilename(Start)].push_back(MoveNs);
714+
MoveNamespaces[std::string(SM.getFilename(Start))].push_back(MoveNs);
715715
}
716716

717717
// Removes a class forward declaration from the code in the moved namespace and
@@ -762,7 +762,7 @@ void ChangeNamespaceTool::moveClassForwardDeclaration(
762762
InsertForwardDeclaration InsertFwd;
763763
InsertFwd.InsertionOffset = Insertion.getOffset();
764764
InsertFwd.ForwardDeclText = Insertion.getReplacementText().str();
765-
InsertFwdDecls[Insertion.getFilePath()].push_back(InsertFwd);
765+
InsertFwdDecls[std::string(Insertion.getFilePath())].push_back(InsertFwd);
766766
}
767767

768768
// Replaces a qualified symbol (in \p DeclCtx) that refers to a declaration \p
@@ -816,7 +816,7 @@ void ChangeNamespaceTool::replaceQualifiedSymbolInDeclContext(
816816
->getQualifiedNameAsString())) {
817817
FromDeclNameRef = FromDeclNameRef.drop_front(2);
818818
if (FromDeclNameRef.size() < ReplaceName.size())
819-
ReplaceName = FromDeclNameRef;
819+
ReplaceName = std::string(FromDeclNameRef);
820820
}
821821
}
822822
// Checks if there is any namespace alias declarations that can shorten the

clang-tools-extra/clang-change-namespace/tool/ClangChangeNamespace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ llvm::ErrorOr<std::vector<std::string>> GetWhiteListedSymbolPatterns() {
9191
llvm::StringRef Content = File.get()->getBuffer();
9292
Content.split(Lines, '\n', /*MaxSplit=*/-1, /*KeepEmpty=*/false);
9393
for (auto Line : Lines)
94-
Patterns.push_back(Line.trim());
94+
Patterns.push_back(std::string(Line.trim()));
9595
return Patterns;
9696
}
9797

clang-tools-extra/clang-doc/HTMLGenerator.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ genStylesheetsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
278278
llvm::sys::path::filename(FilePath));
279279
// Paths in HTML must be in posix-style
280280
llvm::sys::path::native(StylesheetPath, llvm::sys::path::Style::posix);
281-
LinkNode->Attributes.emplace_back("href", StylesheetPath.str());
281+
LinkNode->Attributes.emplace_back("href", std::string(StylesheetPath.str()));
282282
Out.emplace_back(std::move(LinkNode));
283283
}
284284
return Out;
@@ -293,7 +293,7 @@ genJsScriptsHTML(StringRef InfoPath, const ClangDocContext &CDCtx) {
293293
llvm::sys::path::append(ScriptPath, llvm::sys::path::filename(FilePath));
294294
// Paths in HTML must be in posix-style
295295
llvm::sys::path::native(ScriptPath, llvm::sys::path::Style::posix);
296-
ScriptNode->Attributes.emplace_back("src", ScriptPath.str());
296+
ScriptNode->Attributes.emplace_back("src", std::string(ScriptPath.str()));
297297
Out.emplace_back(std::move(ScriptNode));
298298
}
299299
return Out;
@@ -422,7 +422,7 @@ genReferencesBlock(const std::vector<Reference> &References,
422422

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

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

clang-tools-extra/clang-doc/Representation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@ ClangDocContext::ClangDocContext(tooling::ExecutionContext *ECtx,
286286
if (SourceRoot.empty())
287287
// If no SourceRoot was provided the current path is used as the default
288288
llvm::sys::fs::current_path(SourceRootDir);
289-
this->SourceRoot = SourceRootDir.str();
289+
this->SourceRoot = std::string(SourceRootDir.str());
290290
if (!RepositoryUrl.empty()) {
291-
this->RepositoryUrl = RepositoryUrl;
291+
this->RepositoryUrl = std::string(RepositoryUrl);
292292
if (!RepositoryUrl.empty() && RepositoryUrl.find("http://") != 0 &&
293293
RepositoryUrl.find("https://") != 0)
294294
this->RepositoryUrl->insert(0, "https://");

clang-tools-extra/clang-doc/tool/ClangDocMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ int main(int argc, const char **argv) {
232232
llvm::sys::path::native(AssetsPath, IndexJS);
233233
llvm::sys::path::append(IndexJS, "index.js");
234234
CDCtx.UserStylesheets.insert(CDCtx.UserStylesheets.begin(),
235-
DefaultStylesheet.str());
235+
std::string(DefaultStylesheet.str()));
236236
CDCtx.FilesToCopy.emplace_back(IndexJS.str());
237237
}
238238

clang-tools-extra/clang-include-fixer/InMemorySymbolIndex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ namespace include_fixer {
1616
InMemorySymbolIndex::InMemorySymbolIndex(
1717
const std::vector<SymbolAndSignals> &Symbols) {
1818
for (const auto &Symbol : Symbols)
19-
LookupTable[Symbol.Symbol.getName()].push_back(Symbol);
19+
LookupTable[std::string(Symbol.Symbol.getName())].push_back(Symbol);
2020
}
2121

2222
std::vector<SymbolAndSignals>
2323
InMemorySymbolIndex::search(llvm::StringRef Identifier) {
24-
auto I = LookupTable.find(Identifier);
24+
auto I = LookupTable.find(std::string(Identifier));
2525
if (I != LookupTable.end())
2626
return I->second;
2727
return {};

clang-tools-extra/clang-include-fixer/IncludeFixer.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ std::string IncludeFixerSemaSource::minimizeInclude(
302302
StringRef Include, const clang::SourceManager &SourceManager,
303303
clang::HeaderSearch &HeaderSearch) const {
304304
if (!MinimizeIncludePaths)
305-
return Include;
305+
return std::string(Include);
306306

307307
// Get the FileEntry for the include.
308308
StringRef StrippedInclude = Include.trim("\"<>");
@@ -311,7 +311,7 @@ std::string IncludeFixerSemaSource::minimizeInclude(
311311
// If the file doesn't exist return the path from the database.
312312
// FIXME: This should never happen.
313313
if (!Entry)
314-
return Include;
314+
return std::string(Include);
315315

316316
bool IsSystem = false;
317317
std::string Suggestion =
@@ -352,7 +352,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
352352
if (!GenerateDiagnostics && !QuerySymbolInfos.empty()) {
353353
if (ScopedQualifiers == QuerySymbolInfos.front().ScopedQualifiers &&
354354
Query == QuerySymbolInfos.front().RawIdentifier) {
355-
QuerySymbolInfos.push_back({Query.str(), ScopedQualifiers, Range});
355+
QuerySymbolInfos.push_back(
356+
{Query.str(), std::string(ScopedQualifiers), Range});
356357
}
357358
return {};
358359
}
@@ -367,7 +368,8 @@ IncludeFixerSemaSource::query(StringRef Query, StringRef ScopedQualifiers,
367368
CI->getSourceManager().getLocForStartOfFile(
368369
CI->getSourceManager().getMainFileID()));
369370

370-
QuerySymbolInfos.push_back({Query.str(), ScopedQualifiers, Range});
371+
QuerySymbolInfos.push_back(
372+
{Query.str(), std::string(ScopedQualifiers), Range});
371373

372374
// Query the symbol based on C++ name Lookup rules.
373375
// Firstly, lookup the identifier with scoped namespace contexts;

clang-tools-extra/clang-include-fixer/IncludeFixer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ class IncludeFixerSemaSource : public clang::ExternalSemaSource {
9292
GenerateDiagnostics(GenerateDiagnostics) {}
9393

9494
void setCompilerInstance(CompilerInstance *CI) { this->CI = CI; }
95-
void setFilePath(StringRef FilePath) { this->FilePath = FilePath; }
95+
void setFilePath(StringRef FilePath) {
96+
this->FilePath = std::string(FilePath);
97+
}
9698

9799
/// Callback for incomplete types. If we encounter a forward declaration we
98100
/// have the fully qualified name ready. Just query that.

clang-tools-extra/clang-include-fixer/IncludeFixerContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ std::string createQualifiedNameForReplacement(
2929
// No need to add missing qualifiers if SymbolIdentifier has a global scope
3030
// operator "::".
3131
if (RawSymbolName.startswith("::"))
32-
return RawSymbolName;
32+
return std::string(RawSymbolName);
3333

3434
std::string QualifiedName = MatchedSymbol.getQualifiedName();
3535

clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ void FindAllSymbols::run(const MatchFinder::MatchResult &Result) {
251251

252252
const SourceManager *SM = Result.SourceManager;
253253
if (auto Symbol = CreateSymbolInfo(ND, *SM, Collector)) {
254-
Filename = SM->getFileEntryForID(SM->getMainFileID())->getName();
254+
Filename =
255+
std::string(SM->getFileEntryForID(SM->getMainFileID())->getName());
255256
FileSymbols[*Symbol] += Signals;
256257
}
257258
}

clang-tools-extra/clang-include-fixer/find-all-symbols/HeaderMapCollector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class HeaderMapCollector {
2929

3030
void addHeaderMapping(llvm::StringRef OrignalHeaderPath,
3131
llvm::StringRef MappingHeaderPath) {
32-
HeaderMappingTable[OrignalHeaderPath] = MappingHeaderPath;
32+
HeaderMappingTable[OrignalHeaderPath] = std::string(MappingHeaderPath);
3333
};
3434

3535
/// Check if there is a mapping from \p Header or a regex pattern that matches

clang-tools-extra/clang-include-fixer/find-all-symbols/PathConfig.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ std::string getIncludePath(const SourceManager &SM, SourceLocation Loc,
3434
SmallString<256> CleanedFilePath = FilePath;
3535
llvm::sys::path::remove_dots(CleanedFilePath, /*remove_dot_dot=*/false);
3636

37-
return CleanedFilePath.str();
37+
return std::string(CleanedFilePath.str());
3838
}
3939

4040
} // namespace find_all_symbols

clang-tools-extra/clang-include-fixer/find-all-symbols/SymbolInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class SymbolInfo {
7474
SymbolInfo(llvm::StringRef Name, SymbolKind Type, llvm::StringRef FilePath,
7575
const std::vector<Context> &Contexts);
7676

77-
void SetFilePath(llvm::StringRef Path) { FilePath = Path; }
77+
void SetFilePath(llvm::StringRef Path) { FilePath = std::string(Path); }
7878

7979
/// Get symbol name.
8080
llvm::StringRef getName() const { return Name; }

clang-tools-extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class ClangIncludeFixerPluginAction : public PluginASTAction {
6060
Input = Arg.substr(strlen("-input="));
6161
}
6262

63-
std::string InputFile = CI.getFrontendOpts().Inputs[0].getFile();
63+
std::string InputFile =
64+
std::string(CI.getFrontendOpts().Inputs[0].getFile());
6465
auto CreateYamlIdx = [=]() -> std::unique_ptr<include_fixer::SymbolIndex> {
6566
llvm::ErrorOr<std::unique_ptr<include_fixer::YamlSymbolIndex>> SymbolIdx(
6667
nullptr);

clang-tools-extra/clang-move/Move.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ std::string CleanPath(StringRef PathRef) {
6565
llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true);
6666
// FIXME: figure out why this is necessary.
6767
llvm::sys::path::native(Path);
68-
return Path.str();
68+
return std::string(Path.str());
6969
}
7070

7171
// Make the Path absolute using the CurrentDir if the Path is not an absolute
@@ -785,13 +785,13 @@ void ClangMoveTool::removeDeclsInOldFiles() {
785785
continue;
786786
}
787787
auto CleanReplacements = format::cleanupAroundReplacements(
788-
Code, Context->FileToReplacements[FilePath], *Style);
788+
Code, Context->FileToReplacements[std::string(FilePath)], *Style);
789789

790790
if (!CleanReplacements) {
791791
llvm::errs() << llvm::toString(CleanReplacements.takeError()) << "\n";
792792
continue;
793793
}
794-
Context->FileToReplacements[FilePath] = *CleanReplacements;
794+
Context->FileToReplacements[std::string(FilePath)] = *CleanReplacements;
795795
}
796796
}
797797

@@ -870,7 +870,7 @@ void ClangMoveTool::moveAll(SourceManager &SM, StringRef OldFile,
870870
else if (Context->Spec.NewHeader == NewFile &&
871871
OldHeaderIncludeRangeInHeader.isValid())
872872
ReplaceOldInclude(OldHeaderIncludeRangeInHeader);
873-
Context->FileToReplacements[NewFile] = std::move(AllCode);
873+
Context->FileToReplacements[std::string(NewFile)] = std::move(AllCode);
874874
}
875875
}
876876

clang-tools-extra/clang-move/tool/ClangMove.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ int main(int argc, const char **argv) {
124124
Twine(EC.message()));
125125

126126
move::ClangMoveContext Context{Spec, Tool.getReplacements(),
127-
InitialDirectory.str(), Style, DumpDecls};
127+
std::string(InitialDirectory.str()), Style,
128+
DumpDecls};
128129
move::DeclarationReporter Reporter;
129130
move::ClangMoveActionFactory Factory(&Context, &Reporter);
130131

clang-tools-extra/clang-query/QueryParser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ template <typename T> struct QueryParser::LexOrCompleteWord {
8282
CaseStr.substr(0, WordCompletionPos) ==
8383
Word.substr(0, WordCompletionPos))
8484
P->Completions.push_back(LineEditor::Completion(
85-
(CaseStr.substr(WordCompletionPos) + " ").str(), CaseStr));
85+
(CaseStr.substr(WordCompletionPos) + " ").str(),
86+
std::string(CaseStr)));
8687
return *this;
8788
}
8889

clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ addReplacement(SourceRange Old, SourceRange New, const ASTContext &Context,
8989
tooling::Replacement R(Context.getSourceManager(),
9090
CharSourceRange::getTokenRange(Old), NewText,
9191
Context.getLangOpts());
92-
consumeError(Replacements[R.getFilePath()].add(R));
92+
consumeError(Replacements[std::string(R.getFilePath())].add(R));
9393
}
9494

9595
/// Find all member fields used in the given init-list initializer expr

clang-tools-extra/clang-tidy/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,19 @@ set(ALL_CLANG_TIDY_CHECKS ${ALL_CLANG_TIDY_CHECKS} PARENT_SCOPE)
9494
add_subdirectory(plugin)
9595
add_subdirectory(tool)
9696
add_subdirectory(utils)
97+
98+
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
99+
install(DIRECTORY .
100+
DESTINATION include/clang-tidy
101+
COMPONENT clang-tidy-headers
102+
FILES_MATCHING
103+
PATTERN "*.h"
104+
)
105+
add_custom_target(clang-tidy-headers)
106+
set_target_properties(clang-tidy-headers PROPERTIES FOLDER "Misc")
107+
if(NOT LLVM_ENABLE_IDE)
108+
add_llvm_install_targets(install-clang-tidy-headers
109+
DEPENDS clang-tidy-headers
110+
COMPONENT clang-tidy-headers)
111+
endif()
112+
endif()

clang-tools-extra/clang-tidy/ClangTidy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static CheckersList getAnalyzerCheckersAndPackages(ClangTidyContext &Context,
359359

360360
if (CheckName.startswith("core") ||
361361
Context.isCheckEnabled(ClangTidyCheckName)) {
362-
List.emplace_back(CheckName, true);
362+
List.emplace_back(std::string(CheckName), true);
363363
}
364364
}
365365
return List;
@@ -596,7 +596,7 @@ void exportReplacements(const llvm::StringRef MainFilePath,
596596
const std::vector<ClangTidyError> &Errors,
597597
raw_ostream &OS) {
598598
TranslationUnitDiagnostics TUD;
599-
TUD.MainSourceFile = MainFilePath;
599+
TUD.MainSourceFile = std::string(MainFilePath);
600600
for (const auto &Error : Errors) {
601601
tooling::Diagnostic Diag = Error;
602602
TUD.Diagnostics.insert(TUD.Diagnostics.end(), Diag);

0 commit comments

Comments
 (0)