Skip to content

Commit ea3af8a

Browse files
committed
sigh, formatting
1 parent 6b5de16 commit ea3af8a

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

clang/include/clang/AST/ASTContext.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,8 @@ class ASTContext : public RefCountedBase<ASTContext> {
648648
bool containsNonRelocatablePointerAuth(QualType T) {
649649
if (!isPointerAuthenticationAvailable())
650650
return false;
651-
return findPointerAuthContent(T) == PointerAuthContent::AddressDiscriminatedData;
651+
return findPointerAuthContent(T) ==
652+
PointerAuthContent::AddressDiscriminatedData;
652653
}
653654

654655
private:

clang/lib/AST/ASTContext.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,9 +1705,8 @@ void ASTContext::setRelocationInfoForCXXRecord(
17051705
RelocatableClasses.insert({D, Info});
17061706
}
17071707

1708-
static bool
1709-
primaryBaseHaseAddressDiscriminatedVTableAuthentication(ASTContext &Context,
1710-
const CXXRecordDecl *Class) {
1708+
static bool primaryBaseHaseAddressDiscriminatedVTableAuthentication(
1709+
ASTContext &Context, const CXXRecordDecl *Class) {
17111710
if (!Class->isPolymorphic())
17121711
return false;
17131712
const CXXRecordDecl *BaseType = Context.baseForVTableAuthentication(Class);
@@ -1747,22 +1746,27 @@ ASTContext::PointerAuthContent ASTContext::findPointerAuthContent(QualType T) {
17471746
return Result;
17481747
};
17491748
auto ShouldContinueAfterUpdate = [&](PointerAuthContent NewResult) {
1750-
static_assert(PointerAuthContent::None < PointerAuthContent::AddressDiscriminatedVTable);
1751-
static_assert(PointerAuthContent::AddressDiscriminatedVTable < PointerAuthContent::AddressDiscriminatedData);
1749+
static_assert(PointerAuthContent::None <
1750+
PointerAuthContent::AddressDiscriminatedVTable);
1751+
static_assert(PointerAuthContent::AddressDiscriminatedVTable <
1752+
PointerAuthContent::AddressDiscriminatedData);
17521753
if (NewResult > Result)
17531754
Result = NewResult;
17541755
return Result != PointerAuthContent::AddressDiscriminatedData;
17551756
};
17561757
if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD)) {
1757-
if (primaryBaseHaseAddressDiscriminatedVTableAuthentication(*this, CXXRD) && !ShouldContinueAfterUpdate(PointerAuthContent::AddressDiscriminatedVTable))
1758+
if (primaryBaseHaseAddressDiscriminatedVTableAuthentication(*this, CXXRD) &&
1759+
!ShouldContinueAfterUpdate(
1760+
PointerAuthContent::AddressDiscriminatedVTable))
17581761
return SaveResultAndReturn();
17591762
for (auto Base : CXXRD->bases()) {
17601763
if (!ShouldContinueAfterUpdate(findPointerAuthContent(Base.getType())))
17611764
return SaveResultAndReturn();
17621765
}
17631766
}
17641767
for (auto *FieldDecl : RD->fields()) {
1765-
if (!ShouldContinueAfterUpdate(findPointerAuthContent(FieldDecl->getType())))
1768+
if (!ShouldContinueAfterUpdate(
1769+
findPointerAuthContent(FieldDecl->getType())))
17661770
return SaveResultAndReturn();
17671771
}
17681772
return SaveResultAndReturn();

0 commit comments

Comments
 (0)