Skip to content

Commit 42cf015

Browse files
committed
clang-format related code
1 parent 04636be commit 42cf015

File tree

5 files changed

+18
-21
lines changed

5 files changed

+18
-21
lines changed

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,9 @@ void MicrosoftCXXNameMangler::mangleCXXDtorType(CXXDtorType T) {
14841484
// <operator-name> ::= ?_G # scalar deleting destructor
14851485
case Dtor_Deleting: Out << "?_G"; return;
14861486
// <operator-name> ::= ?_E # vector deleting destructor
1487-
case Dtor_VectorDeleting: Out << "?_E"; return;
1487+
case Dtor_VectorDeleting:
1488+
Out << "?_E";
1489+
return;
14881490
case Dtor_Comdat:
14891491
llvm_unreachable("not expecting a COMDAT");
14901492
}
@@ -2885,10 +2887,10 @@ void MicrosoftCXXNameMangler::mangleFunctionType(const FunctionType *T,
28852887
// ::= @ # structors (they have no declared return type)
28862888
if (IsStructor) {
28872889
if (isa<CXXDestructorDecl>(D) && isStructorDecl(D)) {
2888-
// The deleting destructors take an extra argument of type int that indicates
2889-
// whether the storage for the object should be deleted and whether a single
2890-
// object or an array of objects is being destroyed. This extra argument is not
2891-
// reflected in the AST.
2890+
// The deleting destructors take an extra argument of type int that
2891+
// indicates whether the storage for the object should be deleted and
2892+
// whether a single object or an array of objects is being destroyed. This
2893+
// extra argument is not reflected in the AST.
28922894
if (StructorType == Dtor_Deleting ||
28932895
StructorType == Dtor_VectorDeleting) {
28942896
Out << (PointersAre64Bit ? "PEAXI@Z" : "PAXI@Z");

clang/lib/CodeGen/CGClass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ llvm::Value *LoadThisForDtorDelete(CodeGenFunction &CGF,
14401440
return CGF.EmitScalarExpr(ThisArg);
14411441
return CGF.LoadCXXThis();
14421442
}
1443-
}
1443+
} // namespace
14441444

14451445
void EmitConditionalArrayDtorCall(const CXXDestructorDecl *DD,
14461446
CodeGenFunction &CGF,
@@ -1570,7 +1570,8 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) {
15701570
switch (DtorType) {
15711571
case Dtor_Comdat: llvm_unreachable("not expecting a COMDAT");
15721572
case Dtor_Deleting: llvm_unreachable("already handled deleting case");
1573-
case Dtor_VectorDeleting: llvm_unreachable("already handled vector deleting case");
1573+
case Dtor_VectorDeleting:
1574+
llvm_unreachable("already handled vector deleting case");
15741575

15751576
case Dtor_Complete:
15761577
assert((Body || getTarget().getCXXABI().isMicrosoft()) &&

clang/lib/CodeGen/CGExprCXX.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,10 +1914,8 @@ static void EmitDestroyingObjectDelete(CodeGenFunction &CGF,
19141914
/// Emit the code for deleting a single object.
19151915
/// \return \c true if we started emitting UnconditionalDeleteBlock, \c false
19161916
/// if not.
1917-
static bool EmitObjectDelete(CodeGenFunction &CGF,
1918-
const CXXDeleteExpr *DE,
1919-
Address Ptr,
1920-
QualType ElementType,
1917+
static bool EmitObjectDelete(CodeGenFunction &CGF, const CXXDeleteExpr *DE,
1918+
Address Ptr, QualType ElementType,
19211919
llvm::BasicBlock *UnconditionalDeleteBlock,
19221920
bool ArrayDeletion) {
19231921
// C++11 [expr.delete]p3:
@@ -2164,7 +2162,7 @@ void CodeGenFunction::EmitCXXDeleteExpr(const CXXDeleteExpr *E) {
21642162

21652163
EmitBlock(bodyBB);
21662164
if (!EmitObjectDelete(*this, E, Ptr, DeleteTy, DeleteEnd,
2167-
/*ArrayDeletion*/true))
2165+
/*ArrayDeletion*/ true))
21682166
EmitBlock(DeleteEnd);
21692167
return;
21702168
}

clang/lib/CodeGen/ItaniumCXXABI.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI {
182182
}
183183

184184
bool shouldTypeidBeNullChecked(QualType SrcRecordTy) override;
185-
bool hasVectorDeletingDtors() override {
186-
return false;
187-
}
185+
bool hasVectorDeletingDtors() override { return false; }
188186
void EmitBadTypeidCall(CodeGenFunction &CGF) override;
189187
llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy,
190188
Address ThisPtr,
@@ -455,7 +453,8 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI {
455453
if (!IsInlined)
456454
continue;
457455

458-
StringRef Name = CGM.getMangledName(VtableComponent.getGlobalDecl(false));
456+
StringRef Name =
457+
CGM.getMangledName(VtableComponent.getGlobalDecl(false));
459458
auto *Entry = CGM.GetGlobalValue(Name);
460459
// This checks if virtual inline function has already been emitted.
461460
// Note that it is possible that this inline function would be emitted
@@ -1373,8 +1372,7 @@ bool ItaniumCXXABI::isZeroInitializable(const MemberPointerType *MPT) {
13731372
/// at entry -2 in the vtable.
13741373
void ItaniumCXXABI::emitVirtualObjectDelete(CodeGenFunction &CGF,
13751374
const CXXDeleteExpr *DE,
1376-
Address Ptr,
1377-
QualType ElementType,
1375+
Address Ptr, QualType ElementType,
13781376
const CXXDestructorDecl *Dtor,
13791377
bool ArrayDeletion) {
13801378
bool UseGlobalDelete = DE->isGlobalDelete();

clang/lib/CodeGen/MicrosoftCXXABI.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,7 @@ class MicrosoftCXXABI : public CGCXXABI {
146146
}
147147

148148
bool shouldTypeidBeNullChecked(QualType SrcRecordTy) override;
149-
bool hasVectorDeletingDtors() override {
150-
return true;
151-
}
149+
bool hasVectorDeletingDtors() override { return true; }
152150
void EmitBadTypeidCall(CodeGenFunction &CGF) override;
153151
llvm::Value *EmitTypeid(CodeGenFunction &CGF, QualType SrcRecordTy,
154152
Address ThisPtr,

0 commit comments

Comments
 (0)