Skip to content

Commit f3f09ab

Browse files
committed
Merge branch 'fix/163090' of https://github.com/a-tarasyuk/llvm-project into fix/163090
2 parents 9e9f328 + a03a7cf commit f3f09ab

File tree

412 files changed

+10033
-5651
lines changed

Some content is hidden

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

412 files changed

+10033
-5651
lines changed

bolt/include/bolt/Passes/PLTCall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class PLTCall : public BinaryFunctionPass {
2626
explicit PLTCall(const cl::opt<bool> &PrintPass)
2727
: BinaryFunctionPass(PrintPass) {}
2828

29-
const char *getName() const override { return "PLT call optimization"; }
29+
const char *getName() const override { return "plt-call-optimization"; }
3030
bool shouldPrint(const BinaryFunction &BF) const override {
3131
return BinaryFunctionPass::shouldPrint(BF);
3232
}

bolt/include/bolt/Passes/TailDuplication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class TailDuplication : public BinaryFunctionPass {
143143

144144
explicit TailDuplication() : BinaryFunctionPass(false) {}
145145

146-
const char *getName() const override { return "tail duplication"; }
146+
const char *getName() const override { return "tail-duplication"; }
147147

148148
Error runOnFunctions(BinaryContext &BC) override;
149149
};

clang-tools-extra/clang-tidy/bugprone/InvalidEnumDefaultInitializationCheck.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ class FindEnumMember : public TypeVisitor<FindEnumMember, bool> {
6969
return Visit(T->getElementType().getTypePtr());
7070
}
7171
bool VisitEnumType(const EnumType *T) {
72-
if (isCompleteAndHasNoZeroValue(T->getOriginalDecl())) {
72+
if (isCompleteAndHasNoZeroValue(T->getDecl())) {
7373
FoundEnum = T;
7474
return true;
7575
}
7676
return false;
7777
}
7878
bool VisitRecordType(const RecordType *T) {
79-
const RecordDecl *RD = T->getOriginalDecl()->getDefinition();
79+
const RecordDecl *RD = T->getDecl()->getDefinition();
8080
if (!RD || RD->isUnion())
8181
return false;
8282
auto VisitField = [this](const FieldDecl *F) {
@@ -139,7 +139,7 @@ void InvalidEnumDefaultInitializationCheck::check(
139139
if (!Finder.Visit(InitList->getArrayFiller()->getType().getTypePtr()))
140140
return;
141141
InitExpr = InitList;
142-
Enum = Finder.FoundEnum->getOriginalDecl();
142+
Enum = Finder.FoundEnum->getDecl();
143143
}
144144

145145
if (!InitExpr || !Enum)

clang-tools-extra/clang-tidy/bugprone/NotNullTerminatedResultCheck.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,17 @@ static unsigned getLength(const Expr *E,
6464
if (!E)
6565
return 0;
6666

67-
Expr::EvalResult Length;
6867
E = E->IgnoreImpCasts();
6968

7069
if (const auto *LengthDRE = dyn_cast<DeclRefExpr>(E))
7170
if (const auto *LengthVD = dyn_cast<VarDecl>(LengthDRE->getDecl()))
7271
if (!isa<ParmVarDecl>(LengthVD))
73-
if (const Expr *LengthInit = LengthVD->getInit())
72+
if (const Expr *LengthInit = LengthVD->getInit();
73+
LengthInit && !LengthInit->isValueDependent()) {
74+
Expr::EvalResult Length;
7475
if (LengthInit->EvaluateAsInt(Length, *Result.Context))
7576
return Length.Val.getInt().getZExtValue();
77+
}
7678

7779
if (const auto *LengthIL = dyn_cast<IntegerLiteral>(E))
7880
return LengthIL->getValue().getZExtValue();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ struct InitializerInsertion {
190190
// Convenience utility to get a RecordDecl from a QualType.
191191
const RecordDecl *getCanonicalRecordDecl(const QualType &Type) {
192192
if (const auto *RT = Type->getAsCanonical<RecordType>())
193-
return RT->getOriginalDecl();
193+
return RT->getDecl();
194194
return nullptr;
195195
}
196196

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static bool isStdInitializerList(QualType Type) {
7272
}
7373
if (const auto *RT = Type->getAs<RecordType>()) {
7474
if (const auto *Specialization =
75-
dyn_cast<ClassTemplateSpecializationDecl>(RT->getOriginalDecl()))
75+
dyn_cast<ClassTemplateSpecializationDecl>(RT->getDecl()))
7676
return declIsStdInitializerList(Specialization->getSpecializedTemplate());
7777
}
7878
return false;

clang-tools-extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void UnusedUsingDeclsCheck::check(const MatchFinder::MatchResult &Result) {
132132
}
133133
if (const auto *ECD = dyn_cast<EnumConstantDecl>(Used)) {
134134
if (const auto *ET = ECD->getType()->getAsCanonical<EnumType>())
135-
removeFromFoundDecls(ET->getOriginalDecl());
135+
removeFromFoundDecls(ET->getDecl());
136136
}
137137
};
138138
// We rely on the fact that the clang AST is walked in order, usages are only

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static bool isLockGuardDecl(const NamedDecl *Decl) {
2929

3030
static bool isLockGuard(const QualType &Type) {
3131
if (const auto *Record = Type->getAsCanonical<RecordType>())
32-
if (const RecordDecl *Decl = Record->getOriginalDecl())
32+
if (const RecordDecl *Decl = Record->getDecl())
3333
return isLockGuardDecl(Decl);
3434

3535
if (const auto *TemplateSpecType = Type->getAs<TemplateSpecializationType>())

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct UnqualNameVisitor : public RecursiveASTVisitor<UnqualNameVisitor> {
7777
if (T->getKeyword() != ElaboratedTypeKeyword::None ||
7878
TTL.getQualifierLoc())
7979
break;
80-
if (visitUnqualName(T->getOriginalDecl()->getName()))
80+
if (visitUnqualName(T->getDecl()->getName()))
8181
return false;
8282
break;
8383
}

clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,10 @@ static bool areTypesCompatible(QualType ArgType, QualType ParamType,
413413

414414
// Arithmetic types are interconvertible, except scoped enums.
415415
if (ParamType->isArithmeticType() && ArgType->isArithmeticType()) {
416-
if ((ParamType->isEnumeralType() && ParamType->castAsCanonical<EnumType>()
417-
->getOriginalDecl()
418-
->isScoped()) ||
416+
if ((ParamType->isEnumeralType() &&
417+
ParamType->castAsCanonical<EnumType>()->getDecl()->isScoped()) ||
419418
(ArgType->isEnumeralType() &&
420-
ArgType->castAsCanonical<EnumType>()->getOriginalDecl()->isScoped()))
419+
ArgType->castAsCanonical<EnumType>()->getDecl()->isScoped()))
421420
return false;
422421

423422
return true;

0 commit comments

Comments
 (0)