Skip to content

Commit ee2b833

Browse files
Apply git clang-format
1 parent 5769b2a commit ee2b833

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

clang/include/clang/ExtractAPI/API.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,8 @@ class APISet {
14211421
createRecord(StringRef USR, StringRef Name, CtorArgsContTy &&...CtorArgs);
14221422

14231423
auto getTopLevelRecords() const {
1424-
return llvm::iterator_range<decltype(TopLevelRecords)::iterator>(TopLevelRecords);
1424+
return llvm::iterator_range<decltype(TopLevelRecords)::iterator>(
1425+
TopLevelRecords);
14251426
}
14261427

14271428
void removeRecord(StringRef USR);

clang/include/clang/ExtractAPI/ExtractAPIVisitor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,8 @@ bool ExtractAPIVisitorBase<Derived>::VisitRecordDecl(const RecordDecl *Decl) {
606606
}
607607

608608
template <typename Derived>
609-
bool ExtractAPIVisitorBase<Derived>::TraverseCXXRecordDecl(CXXRecordDecl *Decl) {
609+
bool ExtractAPIVisitorBase<Derived>::TraverseCXXRecordDecl(
610+
CXXRecordDecl *Decl) {
610611
bool Ret = Base::TraverseCXXRecordDecl(Decl);
611612

612613
if (!isEmbeddedInVarDeclarator(*Decl) && Decl->isAnonymousStructOrUnion()) {

clang/lib/ExtractAPI/API.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ void RecordContext::stealRecordChain(RecordContext &Other) {
7070

7171
Last = Other.Last;
7272

73-
for (auto *StolenRecord = Other.First; StolenRecord != nullptr; StolenRecord = StolenRecord->getNextInContext())
73+
for (auto *StolenRecord = Other.First; StolenRecord != nullptr;
74+
StolenRecord = StolenRecord->getNextInContext())
7475
StolenRecord->Parent = SymbolReference(cast<APIRecord>(this));
7576

7677
// Delete Other's chain to ensure we don't accidentally traverse it.
@@ -135,25 +136,22 @@ SymbolReference APISet::createSymbolReference(StringRef Name, StringRef USR,
135136
return SymbolReference(copyString(Name), copyString(USR), copyString(Source));
136137
}
137138

138-
139139
void APISet::removeRecord(StringRef USR) {
140140
auto Result = USRBasedLookupTable.find(USR);
141141
if (Result != USRBasedLookupTable.end()) {
142142
auto *Record = Result->getSecond().get();
143-
auto &ParentReference= Record->Parent;
143+
auto &ParentReference = Record->Parent;
144144
auto *ParentRecord = const_cast<APIRecord *>(ParentReference.Record);
145145
if (!ParentRecord)
146146
ParentRecord = findRecordForUSR(ParentReference.USR);
147147

148148
if (auto *ParentCtx = llvm::cast_if_present<RecordContext>(ParentRecord)) {
149149
ParentCtx->removeFromRecordChain(Record);
150-
if (auto *RecordAsCtx=
151-
llvm::dyn_cast<RecordContext>(Record))
150+
if (auto *RecordAsCtx = llvm::dyn_cast<RecordContext>(Record))
152151
ParentCtx->stealRecordChain(*RecordAsCtx);
153152
} else {
154153
TopLevelRecords.erase(Record);
155-
if (auto *RecordAsCtx=
156-
llvm::dyn_cast<RecordContext>(Record)) {
154+
if (auto *RecordAsCtx = llvm::dyn_cast<RecordContext>(Record)) {
157155
for (const auto *Child = RecordAsCtx->First; Child != nullptr;
158156
Child = Child->getNextInContext())
159157
TopLevelRecords.insert(Child);
@@ -163,9 +161,7 @@ void APISet::removeRecord(StringRef USR) {
163161
}
164162
}
165163

166-
void APISet::removeRecord(APIRecord *Record) {
167-
removeRecord(Record->USR);
168-
}
164+
void APISet::removeRecord(APIRecord *Record) { removeRecord(Record->USR); }
169165

170166
APIRecord::~APIRecord() {}
171167
TagRecord::~TagRecord() {}

0 commit comments

Comments
 (0)