Skip to content

Commit 7e5cc89

Browse files
committed
Merge from 'main' to 'sycl-web' (#95)
CONFLICT (content): Merge conflict in clang/lib/Sema/SemaLookup.cpp
2 parents 067fb37 + efc82c4 commit 7e5cc89

File tree

376 files changed

+6266
-3663
lines changed

Some content is hidden

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

376 files changed

+6266
-3663
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,7 @@ void ChangeNamespaceTool::run(
632632
return;
633633
// Ignore out-of-line static methods since they will be handled by nested
634634
// name specifiers.
635-
if (Func->getCanonicalDecl()->getStorageClass() ==
636-
StorageClass::SC_Static &&
635+
if (Func->getCanonicalDecl()->getStorageClass() == StorageClass::Static &&
637636
Func->isOutOfLine())
638637
return;
639638
const auto *Context = Result.Nodes.getNodeAs<Decl>("dc");

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ FixItHint generateFixItHint(const FunctionDecl *Decl) {
5151
// A fixit can be generated for functions of static storage class but
5252
// otherwise the check cannot determine the appropriate function name prefix
5353
// to use.
54-
if (Decl->getStorageClass() != SC_Static)
54+
if (Decl->getStorageClass() != StorageClass::Static)
5555
return FixItHint();
5656

5757
StringRef Name = Decl->getName();
@@ -109,7 +109,7 @@ void FunctionNamingCheck::registerMatchers(MatchFinder *Finder) {
109109
void FunctionNamingCheck::check(const MatchFinder::MatchResult &Result) {
110110
const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("function");
111111

112-
bool IsGlobal = MatchedDecl->getStorageClass() != SC_Static;
112+
bool IsGlobal = MatchedDecl->getStorageClass() != StorageClass::Static;
113113
diag(MatchedDecl->getLocation(),
114114
"%select{static function|function in global namespace}1 named %0 must "
115115
"%select{be in|have an appropriate prefix followed by}1 Pascal case as "

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace {
2626
AST_MATCHER(VarDecl, isLocalVariable) { return Node.isLocalVarDecl(); }
2727

2828
FixItHint generateFixItHint(const VarDecl *Decl, bool IsConst) {
29-
if (IsConst && (Decl->getStorageClass() != SC_Static)) {
29+
if (IsConst && (Decl->getStorageClass() != StorageClass::Static)) {
3030
// No fix available if it is not a static constant, since it is difficult
3131
// to determine the proper fix in this case.
3232
return FixItHint();

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,9 @@ void UseTrailingReturnTypeCheck::keepSpecifiers(
359359
// inline int.
360360
const auto *M = dyn_cast<CXXMethodDecl>(&F);
361361
if (!F.isConstexpr() && !F.isInlineSpecified() &&
362-
F.getStorageClass() != SC_Extern && F.getStorageClass() != SC_Static &&
363-
!Fr && !(M && M->isVirtualAsWritten()))
362+
F.getStorageClass() != StorageClass::Extern &&
363+
F.getStorageClass() != StorageClass::Static && !Fr &&
364+
!(M && M->isVirtualAsWritten()))
364365
return;
365366

366367
// Tokenize return type. If it contains macros which contain a mix of

clang-tools-extra/clangd/AST.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ class DeducedTypeVisitor : public RecursiveASTVisitor<DeducedTypeVisitor> {
367367
// Loc of auto in return type (c++14).
368368
auto CurLoc = D->getReturnTypeSourceRange().getBegin();
369369
// Loc of "auto" in operator auto()
370-
if (CurLoc.isInvalid() && dyn_cast<CXXConversionDecl>(D))
370+
if (CurLoc.isInvalid() && isa<CXXConversionDecl>(D))
371371
CurLoc = D->getTypeSourceInfo()->getTypeLoc().getBeginLoc();
372372
// Loc of "auto" in function with trailing return type (c++11).
373373
if (CurLoc.isInvalid())

clang-tools-extra/clangd/DumpAST.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,8 @@ class DumpVisitor : public RecursiveASTVisitor<DumpVisitor> {
242242
return "const";
243243
return "";
244244
}
245-
if (isa<IntegerLiteral>(S) || isa<FloatingLiteral>(S) ||
246-
isa<FixedPointLiteral>(S) || isa<CharacterLiteral>(S) ||
247-
isa<ImaginaryLiteral>(S) || isa<CXXBoolLiteralExpr>(S))
245+
if (isa<IntegerLiteral, FloatingLiteral, FixedPointLiteral,
246+
CharacterLiteral, ImaginaryLiteral, CXXBoolLiteralExpr>(S))
248247
return toString([&](raw_ostream &OS) {
249248
S->printPretty(OS, nullptr, Ctx.getPrintingPolicy());
250249
});

clang-tools-extra/clangd/FindTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ llvm::SmallVector<ReferenceLoc> refInStmt(const Stmt *S) {
843843
void VisitMemberExpr(const MemberExpr *E) {
844844
// Skip destructor calls to avoid duplication: TypeLoc within will be
845845
// visited separately.
846-
if (llvm::dyn_cast<CXXDestructorDecl>(E->getFoundDecl().getDecl()))
846+
if (llvm::isa<CXXDestructorDecl>(E->getFoundDecl().getDecl()))
847847
return;
848848
Refs.push_back(ReferenceLoc{E->getQualifierLoc(),
849849
E->getMemberNameInfo().getLoc(),

clang-tools-extra/clangd/refactor/Rename.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const NamedDecl *canonicalRenameDecl(const NamedDecl *D) {
119119
// declaration.
120120
while (Method->isVirtual() && Method->size_overridden_methods())
121121
Method = *Method->overridden_methods().begin();
122-
return dyn_cast<NamedDecl>(Method->getCanonicalDecl());
122+
return Method->getCanonicalDecl();
123123
}
124124
if (const auto *Function = dyn_cast<FunctionDecl>(D))
125125
if (const FunctionTemplateDecl *Template = Function->getPrimaryTemplate())

clang-tools-extra/clangd/refactor/tweaks/ExpandAutoType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Expected<Tweak::Effect> ExpandAutoType::apply(const Selection& Inputs) {
111111

112112
// if it's a lambda expression, return an error message
113113
if (isa<RecordType>(*DeducedType) &&
114-
dyn_cast<RecordType>(*DeducedType)->getDecl()->isLambda()) {
114+
cast<RecordType>(*DeducedType)->getDecl()->isLambda()) {
115115
return error("Could not expand type of lambda expression");
116116
}
117117

clang-tools-extra/clangd/refactor/tweaks/ExtractVariable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ computeReferencedDecls(const clang::Expr *Expr) {
7979
}
8080
};
8181
FindDeclRefsVisitor Visitor;
82-
Visitor.TraverseStmt(const_cast<Stmt *>(dyn_cast<Stmt>(Expr)));
82+
Visitor.TraverseStmt(const_cast<Stmt *>(cast<Stmt>(Expr)));
8383
return Visitor.ReferencedDecls;
8484
}
8585

0 commit comments

Comments
 (0)