Skip to content

Commit 0820f21

Browse files
clang format
1 parent 4503b11 commit 0820f21

File tree

10 files changed

+2287
-2234
lines changed

10 files changed

+2287
-2234
lines changed

clang/include/clang/AST/ExprCXX.h

Lines changed: 40 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,10 @@ class CXXDynamicCastExpr final
495495
friend class CastExpr;
496496
friend TrailingObjects;
497497

498-
static CXXDynamicCastExpr *Create(const ASTContext &Context, QualType T,
499-
ExprValueKind VK, CastKind Kind, Expr *Op,
500-
const CXXCastPath *Path,
501-
TypeSourceInfo *Written, SourceLocation L,
502-
SourceLocation RParenLoc,
503-
SourceRange AngleBrackets);
498+
static CXXDynamicCastExpr *
499+
Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind,
500+
Expr *Op, const CXXCastPath *Path, TypeSourceInfo *Written,
501+
SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets);
504502

505503
static CXXDynamicCastExpr *CreateEmpty(const ASTContext &Context,
506504
unsigned pathSize);
@@ -540,12 +538,10 @@ class CXXReinterpretCastExpr final
540538
friend class CastExpr;
541539
friend TrailingObjects;
542540

543-
static CXXReinterpretCastExpr *Create(const ASTContext &Context, QualType T,
544-
ExprValueKind VK, CastKind Kind,
545-
Expr *Op, const CXXCastPath *Path,
546-
TypeSourceInfo *WrittenTy, SourceLocation L,
547-
SourceLocation RParenLoc,
548-
SourceRange AngleBrackets);
541+
static CXXReinterpretCastExpr *
542+
Create(const ASTContext &Context, QualType T, ExprValueKind VK, CastKind Kind,
543+
Expr *Op, const CXXCastPath *Path, TypeSourceInfo *WrittenTy,
544+
SourceLocation L, SourceLocation RParenLoc, SourceRange AngleBrackets);
549545
static CXXReinterpretCastExpr *CreateEmpty(const ASTContext &Context,
550546
unsigned pathSize);
551547

@@ -694,7 +690,7 @@ class UserDefinedLiteral final : public CallExpr {
694690
/// removed).
695691
Expr *getCookedLiteral();
696692
const Expr *getCookedLiteral() const {
697-
return const_cast<UserDefinedLiteral*>(this)->getCookedLiteral();
693+
return const_cast<UserDefinedLiteral *>(this)->getCookedLiteral();
698694
}
699695

700696
SourceLocation getBeginLoc() const {
@@ -813,8 +809,8 @@ class CXXStdInitializerListExpr : public Expr {
813809
setDependence(computeDependence(this));
814810
}
815811

816-
Expr *getSubExpr() { return static_cast<Expr*>(SubExpr); }
817-
const Expr *getSubExpr() const { return static_cast<const Expr*>(SubExpr); }
812+
Expr *getSubExpr() { return static_cast<Expr *>(SubExpr); }
813+
const Expr *getSubExpr() const { return static_cast<const Expr *>(SubExpr); }
818814

819815
SourceLocation getBeginLoc() const LLVM_READONLY {
820816
return SubExpr->getBeginLoc();
@@ -868,9 +864,9 @@ class CXXTypeidExpr : public Expr {
868864
CXXTypeidExpr(EmptyShell Empty, bool isExpr)
869865
: Expr(CXXTypeidExprClass, Empty) {
870866
if (isExpr)
871-
Operand = (Expr*)nullptr;
867+
Operand = (Expr *)nullptr;
872868
else
873-
Operand = (TypeSourceInfo*)nullptr;
869+
Operand = (TypeSourceInfo *)nullptr;
874870
}
875871

876872
/// Determine whether this typeid has a type operand which is potentially
@@ -968,13 +964,13 @@ class MSPropertyRefExpr : public Expr {
968964
else if (QualifierLoc)
969965
return QualifierLoc.getBeginLoc();
970966
else
971-
return MemberLoc;
967+
return MemberLoc;
972968
}
973969

974970
SourceLocation getEndLoc() const { return getMemberLoc(); }
975971

976972
child_range children() {
977-
return child_range((Stmt**)&BaseExpr, (Stmt**)&BaseExpr + 1);
973+
return child_range((Stmt **)&BaseExpr, (Stmt **)&BaseExpr + 1);
978974
}
979975

980976
const_child_range children() const {
@@ -1089,11 +1085,11 @@ class CXXUuidofExpr : public Expr {
10891085
}
10901086

10911087
CXXUuidofExpr(EmptyShell Empty, bool isExpr)
1092-
: Expr(CXXUuidofExprClass, Empty) {
1088+
: Expr(CXXUuidofExprClass, Empty) {
10931089
if (isExpr)
1094-
Operand = (Expr*)nullptr;
1090+
Operand = (Expr *)nullptr;
10951091
else
1096-
Operand = (TypeSourceInfo*)nullptr;
1092+
Operand = (TypeSourceInfo *)nullptr;
10971093
}
10981094

10991095
bool isTypeOperand() const { return isa<TypeSourceInfo *>(Operand); }
@@ -1470,9 +1466,7 @@ class CXXTemporary {
14701466

14711467
const CXXDestructorDecl *getDestructor() const { return Destructor; }
14721468

1473-
void setDestructor(const CXXDestructorDecl *Dtor) {
1474-
Destructor = Dtor;
1475-
}
1469+
void setDestructor(const CXXDestructorDecl *Dtor) { Destructor = Dtor; }
14761470
};
14771471

14781472
/// Represents binding an expression to a temporary.
@@ -1507,7 +1501,7 @@ class CXXBindTemporaryExpr : public Expr {
15071501
: Expr(CXXBindTemporaryExprClass, Empty) {}
15081502

15091503
static CXXBindTemporaryExpr *Create(const ASTContext &C, CXXTemporary *Temp,
1510-
Expr* SubExpr);
1504+
Expr *SubExpr);
15111505

15121506
CXXTemporary *getTemporary() { return Temp; }
15131507
const CXXTemporary *getTemporary() const { return Temp; }
@@ -2214,9 +2208,7 @@ class CXXScalarValueInitExpr : public Expr {
22142208
explicit CXXScalarValueInitExpr(EmptyShell Shell)
22152209
: Expr(CXXScalarValueInitExprClass, Shell) {}
22162210

2217-
TypeSourceInfo *getTypeSourceInfo() const {
2218-
return TypeInfo;
2219-
}
2211+
TypeSourceInfo *getTypeSourceInfo() const { return TypeInfo; }
22202212

22212213
SourceLocation getRParenLoc() const {
22222214
return CXXScalarValueInitExprBits.RParenLoc;
@@ -2769,12 +2761,11 @@ class CXXPseudoDestructorExpr : public Expr {
27692761
PseudoDestructorTypeStorage DestroyedType;
27702762

27712763
public:
2772-
CXXPseudoDestructorExpr(const ASTContext &Context,
2773-
Expr *Base, bool isArrow, SourceLocation OperatorLoc,
2764+
CXXPseudoDestructorExpr(const ASTContext &Context, Expr *Base, bool isArrow,
2765+
SourceLocation OperatorLoc,
27742766
NestedNameSpecifierLoc QualifierLoc,
27752767
TypeSourceInfo *ScopeType,
2776-
SourceLocation ColonColonLoc,
2777-
SourceLocation TildeLoc,
2768+
SourceLocation ColonColonLoc, SourceLocation TildeLoc,
27782769
PseudoDestructorTypeStorage DestroyedType);
27792770

27802771
explicit CXXPseudoDestructorExpr(EmptyShell Shell)
@@ -2917,8 +2908,7 @@ class TypeTraitExpr final
29172908
static TypeTraitExpr *Create(const ASTContext &C, QualType T,
29182909
SourceLocation Loc, TypeTrait Kind,
29192910
ArrayRef<TypeSourceInfo *> Args,
2920-
SourceLocation RParenLoc,
2921-
bool Value);
2911+
SourceLocation RParenLoc, bool Value);
29222912

29232913
static TypeTraitExpr *Create(const ASTContext &C, QualType T,
29242914
SourceLocation Loc, TypeTrait Kind,
@@ -3035,7 +3025,10 @@ class ArrayTypeTraitExpr : public Expr {
30353025

30363026
TypeSourceInfo *getQueriedTypeSourceInfo() const { return QueriedType; }
30373027

3038-
uint64_t getValue() const { assert(!isTypeDependent()); return Value; }
3028+
uint64_t getValue() const {
3029+
assert(!isTypeDependent());
3030+
return Value;
3031+
}
30393032

30403033
Expr *getDimensionExpression() const { return Dimension; }
30413034

@@ -3068,7 +3061,7 @@ class ExpressionTraitExpr : public Expr {
30683061
SourceLocation RParen;
30693062

30703063
/// The expression being queried.
3071-
Expr* QueriedExpression = nullptr;
3064+
Expr *QueriedExpression = nullptr;
30723065

30733066
public:
30743067
friend class ASTStmtReader;
@@ -3802,7 +3795,7 @@ class CXXUnresolvedConstructExpr final
38023795
arg_iterator arg_end() { return arg_begin() + getNumArgs(); }
38033796
arg_range arguments() { return arg_range(arg_begin(), arg_end()); }
38043797

3805-
using const_arg_iterator = const Expr* const *;
3798+
using const_arg_iterator = const Expr *const *;
38063799
using const_arg_range = llvm::iterator_range<const_arg_iterator>;
38073800

38083801
const_arg_iterator arg_begin() const { return getTrailingObjects(); }
@@ -4412,9 +4405,7 @@ class PackExpansionExpr : public Expr {
44124405
}
44134406

44144407
// Iterators
4415-
child_range children() {
4416-
return child_range(&Pattern, &Pattern + 1);
4417-
}
4408+
child_range children() { return child_range(&Pattern, &Pattern + 1); }
44184409

44194410
const_child_range children() const {
44204411
return const_child_range(&Pattern, &Pattern + 1);
@@ -4517,9 +4508,7 @@ class SizeOfPackExpr final
45174508
///
45184509
/// template<typename ...Ts> using X = int[sizeof...(Ts)];
45194510
/// template<typename ...Us> void f(X<Us..., 1, 2, 3, Us...>);
4520-
bool isPartiallySubstituted() const {
4521-
return isValueDependent() && Length;
4522-
}
4511+
bool isPartiallySubstituted() const { return isValueDependent() && Length; }
45234512

45244513
/// Get
45254514
ArrayRef<TemplateArgument> getPartialArguments() const {
@@ -5048,8 +5037,8 @@ class CXXFoldExpr : public Expr {
50485037
UnresolvedLookupExpr *getCallee() const {
50495038
return static_cast<UnresolvedLookupExpr *>(SubExprs[SubExpr::Callee]);
50505039
}
5051-
Expr *getLHS() const { return static_cast<Expr*>(SubExprs[SubExpr::LHS]); }
5052-
Expr *getRHS() const { return static_cast<Expr*>(SubExprs[SubExpr::RHS]); }
5040+
Expr *getLHS() const { return static_cast<Expr *>(SubExprs[SubExpr::LHS]); }
5041+
Expr *getRHS() const { return static_cast<Expr *>(SubExprs[SubExpr::RHS]); }
50535042

50545043
/// Does this produce a right-associated sequence of operators?
50555044
bool isRightFold() const {
@@ -5296,22 +5285,22 @@ class CoroutineSuspendExpr : public Expr {
52965285
}
52975286

52985287
Expr *getCommonExpr() const {
5299-
return static_cast<Expr*>(SubExprs[SubExpr::Common]);
5288+
return static_cast<Expr *>(SubExprs[SubExpr::Common]);
53005289
}
53015290

53025291
/// getOpaqueValue - Return the opaque value placeholder.
53035292
OpaqueValueExpr *getOpaqueValue() const { return OpaqueValue; }
53045293

53055294
Expr *getReadyExpr() const {
5306-
return static_cast<Expr*>(SubExprs[SubExpr::Ready]);
5295+
return static_cast<Expr *>(SubExprs[SubExpr::Ready]);
53075296
}
53085297

53095298
Expr *getSuspendExpr() const {
5310-
return static_cast<Expr*>(SubExprs[SubExpr::Suspend]);
5299+
return static_cast<Expr *>(SubExprs[SubExpr::Suspend]);
53115300
}
53125301

53135302
Expr *getResumeExpr() const {
5314-
return static_cast<Expr*>(SubExprs[SubExpr::Resume]);
5303+
return static_cast<Expr *>(SubExprs[SubExpr::Resume]);
53155304
}
53165305

53175306
// The syntactic operand written in the code
@@ -5505,14 +5494,13 @@ class CXXReflectExpr : public Expr {
55055494
CXXReflectExpr(EmptyShell Empty);
55065495

55075496
public:
5508-
55095497
static CXXReflectExpr *Create(ASTContext &C, SourceLocation OperatorLoc,
55105498
SourceLocation ArgLoc, QualType Operand);
55115499

55125500
static CXXReflectExpr *Create(ASTContext &C, SourceLocation OperatorLoc,
55135501
SourceLocation OperandLoc, Decl *Operand);
55145502

5515-
static CXXReflectExpr *CreateEmpty(ASTContext& C);
5503+
static CXXReflectExpr *CreateEmpty(ASTContext &C);
55165504

55175505
SourceLocation getBeginLoc() const LLVM_READONLY { return OperatorLoc; }
55185506
SourceLocation getEndLoc() const LLVM_READONLY {

0 commit comments

Comments
 (0)