Skip to content

Commit cc6e3f4

Browse files
committed
Merge from 'master' to 'sycl-web' (intel#128)
CONFLICT (content): Merge conflict in clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp CONFLICT (content): Merge conflict in clang/test/Driver/clang-offload-bundler.c
2 parents 70e4c84 + 6e82d0d commit cc6e3f4

File tree

359 files changed

+14551
-5536
lines changed

Some content is hidden

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

359 files changed

+14551
-5536
lines changed

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-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-reorder-fields/ReorderFieldsAction.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ using llvm::SmallSetVector;
3636
static const RecordDecl *findDefinition(StringRef RecordName,
3737
ASTContext &Context) {
3838
auto Results =
39-
match(recordDecl(hasName(std::string(RecordName)), isDefinition())
40-
.bind("recordDecl"),
39+
match(recordDecl(hasName(RecordName), isDefinition()).bind("recordDecl"),
4140
Context);
4241
if (Results.empty()) {
4342
llvm::errs() << "Definition of " << RecordName << " not found\n";

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

Lines changed: 1 addition & 1 deletion
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;

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ class ClangTidyContext {
174174
return DiagLevelAndFormatString(
175175
static_cast<DiagnosticIDs::Level>(
176176
DiagEngine->getDiagnosticLevel(DiagnosticID, Loc)),
177-
DiagEngine->getDiagnosticIDs()->getDescription(DiagnosticID));
177+
std::string(
178+
DiagEngine->getDiagnosticIDs()->getDescription(DiagnosticID)));
178179
}
179180

180181
private:

clang-tools-extra/clang-tidy/abseil/DurationRewriter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ rewriteInverseTimeCall(const MatchFinder::MatchResult &Result,
9191
DurationScale Scale, const Expr &Node) {
9292
llvm::StringRef InverseFunction = getTimeInverseForScale(Scale);
9393
if (const auto *MaybeCallArg = selectFirst<const Expr>(
94-
"e", match(callExpr(callee(functionDecl(
95-
hasName(std::string(InverseFunction)))),
94+
"e", match(callExpr(callee(functionDecl(hasName(InverseFunction))),
9695
hasArgument(0, expr().bind("e"))),
9796
Node, *Result.Context))) {
9897
return tooling::fixit::getText(*MaybeCallArg, *Result.Context).str();

clang-tools-extra/clang-tidy/abseil/TimeSubtractionCheck.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ void TimeSubtractionCheck::registerMatchers(MatchFinder *Finder) {
108108
// a 'Duration'. If we know the result is a 'Duration', we can then infer
109109
// that the second operand must be a 'Time'.
110110
auto CallMatcher =
111-
callExpr(callee(functionDecl(
112-
hasName(std::string(getDurationFactoryForScale(*Scale))))),
113-
hasArgument(0, binaryOperator(hasOperatorName("-"),
114-
hasLHS(TimeInverseMatcher))
115-
.bind("binop")))
111+
callExpr(
112+
callee(functionDecl(hasName(getDurationFactoryForScale(*Scale)))),
113+
hasArgument(0, binaryOperator(hasOperatorName("-"),
114+
hasLHS(TimeInverseMatcher))
115+
.bind("binop")))
116116
.bind("outer_call");
117117
Finder->addMatcher(CallMatcher, this);
118118

@@ -160,8 +160,8 @@ void TimeSubtractionCheck::check(const MatchFinder::MatchResult &Result) {
160160
// latter case (addressed first), we also need to worry about parenthesis.
161161
const auto *MaybeCallArg = selectFirst<const CallExpr>(
162162
"arg", match(expr(hasAncestor(
163-
callExpr(callee(functionDecl(hasName(std::string(
164-
getDurationFactoryForScale(*Scale))))))
163+
callExpr(callee(functionDecl(hasName(
164+
getDurationFactoryForScale(*Scale)))))
165165
.bind("arg"))),
166166
*BinOp, *Result.Context));
167167
if (MaybeCallArg && MaybeCallArg->getArg(0)->IgnoreImpCasts() == BinOp &&

clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void SpecialMemberFunctionsCheck::check(
103103
if (!MatchedDecl)
104104
return;
105105

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

108108
auto StoreMember = [this, &ID](SpecialMemberFunctionKind Kind) {
109109
llvm::SmallVectorImpl<SpecialMemberFunctionKind> &Members =

clang-tools-extra/clang-tidy/google/UpgradeGoogletestCaseCheck.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,10 +242,10 @@ static bool
242242
derivedTypeHasReplacementMethod(const MatchFinder::MatchResult &Result,
243243
llvm::StringRef ReplacementMethod) {
244244
const auto *Class = Result.Nodes.getNodeAs<CXXRecordDecl>("class");
245-
return !match(cxxRecordDecl(unless(isExpansionInFileMatching(
246-
"gtest/gtest(-typed-test)?\\.h$")),
247-
hasMethod(cxxMethodDecl(
248-
hasName(std::string(ReplacementMethod))))),
245+
return !match(cxxRecordDecl(
246+
unless(isExpansionInFileMatching(
247+
"gtest/gtest(-typed-test)?\\.h$")),
248+
hasMethod(cxxMethodDecl(hasName(ReplacementMethod)))),
249249
*Class, *Result.Context)
250250
.empty();
251251
}

clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ classifyToken(const FunctionDecl &F, Preprocessor &PP, Token Tok) {
173173
bool ContainsSomethingElse = false;
174174

175175
Token End;
176+
End.startToken();
176177
End.setKind(tok::eof);
177178
SmallVector<Token, 2> Stream{Tok, End};
178179

0 commit comments

Comments
 (0)