Skip to content

Commit 48637e2

Browse files
committed
Correct formatting
1 parent 4034e2f commit 48637e2

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

clang/lib/AST/Type.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3100,7 +3100,8 @@ bool Type::isStdByteType() const {
31003100

31013101
const TemplateDecl *Type::getSpecializedTemplateDecl() const {
31023102
const Type *DesugaredType = getUnqualifiedDesugaredType();
3103-
if (const auto *Specialization = DesugaredType->getAs<TemplateSpecializationType>())
3103+
if (const auto *Specialization =
3104+
DesugaredType->getAs<TemplateSpecializationType>())
31043105
return Specialization->getTemplateName().getAsTemplateDecl();
31053106
if (const auto *Record = DesugaredType->getAsCXXRecordDecl()) {
31063107
if (const auto *CTS = dyn_cast<ClassTemplateSpecializationDecl>(Record))

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16163,7 +16163,8 @@ Sema::instantiateTypeAwareUsualDelete(FunctionTemplateDecl *FnTemplateDecl,
1616316163
if (!AllowTypeAwareAllocators())
1616416164
return std::nullopt;
1616516165

16166-
TemplateParameterList *TemplateParameters = FnTemplateDecl->getTemplateParameters();
16166+
TemplateParameterList *TemplateParameters =
16167+
FnTemplateDecl->getTemplateParameters();
1616716168
if (TemplateParameters->hasParameterPack())
1616816169
return std::nullopt;
1616916170

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,8 @@ namespace {
18631863
// Type aware allocation involves templates so we need to choose
18641864
// the best type
18651865
FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate();
1866-
FunctionTemplateDecl *OtherPrimaryTemplate = Other.FD->getPrimaryTemplate();
1866+
FunctionTemplateDecl *OtherPrimaryTemplate =
1867+
Other.FD->getPrimaryTemplate();
18671868
if ((!PrimaryTemplate) != (!OtherPrimaryTemplate))
18681869
return OtherPrimaryTemplate ? 1 : -1;
18691870

@@ -1914,7 +1915,8 @@ static bool CheckDeleteOperator(Sema &S, SourceLocation StartLoc,
19141915
CXXRecordDecl *NamingClass, DeclAccessPair Decl,
19151916
FunctionDecl *Operator) {
19161917
if (S.isTypeAwareOperatorNewOrDelete(Operator)) {
1917-
QualType SelectedTypeIdentityParameter = Operator->getParamDecl(0)->getType();
1918+
QualType SelectedTypeIdentityParameter =
1919+
Operator->getParamDecl(0)->getType();
19181920
if (S.RequireCompleteType(StartLoc, SelectedTypeIdentityParameter,
19191921
diag::err_incomplete_type))
19201922
return true;
@@ -3046,8 +3048,8 @@ bool Sema::FindAllocationFunctions(
30463048

30473049
DeclareGlobalNewDelete();
30483050
DeallocLookupMode LookupMode = OriginalTypeAwareState
3049-
? DeallocLookupMode::OptionallyTyped
3050-
: DeallocLookupMode::Untyped;
3051+
? DeallocLookupMode::OptionallyTyped
3052+
: DeallocLookupMode::Untyped;
30513053
LookupGlobalDeallocationFunctions(*this, StartLoc, FoundDelete, LookupMode,
30523054
DeleteName, AllocElemType);
30533055
}
@@ -3179,8 +3181,7 @@ bool Sema::FindAllocationFunctions(
31793181
OperatorDelete->getDeclContext() != OperatorNew->getDeclContext()) {
31803182
Diag(StartLoc,
31813183
diag::err_no_matching_type_aware_cleanup_deallocator_mismatch)
3182-
<< OperatorNew << DeleteName
3183-
<< OperatorNew->getDeclContext();
3184+
<< OperatorNew << DeleteName << OperatorNew->getDeclContext();
31843185
Diag(OperatorNew->getLocation(), diag::err_type_aware_operator_found)
31853186
<< OperatorNew << OperatorNew->getDeclContext();
31863187
Diag(OperatorDelete->getLocation(), diag::err_type_aware_operator_found)
@@ -3498,8 +3499,8 @@ FunctionDecl *Sema::FindUsualDeallocationFunction(
34983499

34993500
LookupResult FoundDelete(*this, Name, StartLoc, LookupOrdinaryName);
35003501
DeallocLookupMode LookupMode = AllowTypeAwareAllocators()
3501-
? DeallocLookupMode::OptionallyTyped
3502-
: DeallocLookupMode::Untyped;
3502+
? DeallocLookupMode::OptionallyTyped
3503+
: DeallocLookupMode::Untyped;
35033504
LookupGlobalDeallocationFunctions(*this, StartLoc, FoundDelete, LookupMode,
35043505
Name, DeallocType);
35053506

0 commit comments

Comments
 (0)