@@ -195,7 +195,8 @@ struct APIRecord {
195195 RK_Unknown,
196196 // If adding a record context record kind here make sure to update
197197 // RecordContext::classof if needed and add a RECORD_CONTEXT entry to
198- // APIRecords.inc RecordContext Kinds start
198+ // APIRecords.inc
199+ RK_FirstRecordContext,
199200 RK_Namespace,
200201 RK_Enum,
201202 RK_Struct,
@@ -207,7 +208,7 @@ struct APIRecord {
207208 RK_ClassTemplate,
208209 RK_ClassTemplateSpecialization,
209210 RK_ClassTemplatePartialSpecialization,
210- // RecordContexts Kinds end
211+ RK_LastRecordContext,
211212 RK_GlobalFunction,
212213 RK_GlobalFunctionTemplate,
213214 RK_GlobalFunctionTemplateSpecialization,
@@ -270,10 +271,10 @@ struct APIRecord {
270271 friend class RecordContext ;
271272 // Used to store the next child record in RecordContext. This works because
272273 // APIRecords semantically only have one parent.
273- mutable APIRecord *NextInContex = nullptr ;
274+ mutable APIRecord *NextInContext = nullptr ;
274275
275276public:
276- APIRecord *getNextInContex () const { return NextInContex ; }
277+ APIRecord *getNextInContext () const { return NextInContext ; }
277278
278279 RecordKind getKind () const { return Kind; }
279280
@@ -312,8 +313,8 @@ class RecordContext {
312313 return classofKind (Record->getKind ());
313314 }
314315 static bool classofKind (APIRecord::RecordKind K) {
315- return K >= APIRecord::RK_Namespace &&
316- K <= APIRecord::RK_ClassTemplatePartialSpecialization ;
316+ return K > APIRecord::RK_FirstRecordContext &&
317+ K < APIRecord::RK_LastRecordContext ;
317318 }
318319
319320 static bool classof (const RecordContext *Context) { return true ; }
@@ -339,7 +340,8 @@ class RecordContext {
339340 // This doesn't strictly meet the iterator requirements, but it's the
340341 // behavior we want here.
341342 value_type operator ->() const { return Current; }
342- record_iterator &operator ++() { Current = Current->getNextInContex ();
343+ record_iterator &operator ++() {
344+ Current = Current->getNextInContext ();
343345 return *this ;
344346 }
345347 record_iterator operator ++(int ) {
@@ -1421,8 +1423,8 @@ APISet::createRecord(StringRef USR, StringRef Name,
14211423
14221424 // Create the record if it does not already exist
14231425 if (Result.second ) {
1424- Record = new (Allocator) RecordTy (USRString, copyString (Name),
1425- std::forward<CtorArgsContTy>(CtorArgs)...);
1426+ Record = new (Allocator) RecordTy (
1427+ USRString, copyString (Name), std::forward<CtorArgsContTy>(CtorArgs)...);
14261428 // Store the record in the record lookup map
14271429 Result.first ->second = APIRecordStoredPtr (Record);
14281430
0 commit comments