clang 19.0.0git
Classes | Namespaces | Macros
APISetVisitor.h File Reference

This file defines the ExtractAPI APISetVisitor interface. More...

#include "clang/ExtractAPI/API.h"
#include "../APIRecords.inc"

Go to the source code of this file.

Classes

class  clang::extractapi::APISetVisitor< Derived >
 The base interface of visitors for API information, the interface and usage is almost identical to RecurisveASTVistor. More...
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::extractapi
 

Macros

#define TRY_TO(CALL_EXPR)
 
#define GENERATE_TRAVERSE_METHOD(CLASS, BASE)
 
#define GENERATE_WALKUP_AND_VISIT_METHODS(CLASS, BASE)
 
#define CONCRETE_RECORD(CLASS, BASE, KIND)
 
#define ABSTRACT_RECORD(CLASS, BASE)    GENERATE_WALKUP_AND_VISIT_METHODS(CLASS, BASE)
 
#define CONCRETE_RECORD(CLASS, BASE, KIND)
 

Detailed Description

This file defines the ExtractAPI APISetVisitor interface.

Definition in file APISetVisitor.h.

Macro Definition Documentation

◆ ABSTRACT_RECORD

#define ABSTRACT_RECORD (   CLASS,
  BASE 
)     GENERATE_WALKUP_AND_VISIT_METHODS(CLASS, BASE)

Definition at line 111 of file APISetVisitor.h.

◆ CONCRETE_RECORD [1/2]

#define CONCRETE_RECORD (   CLASS,
  BASE,
  KIND 
)
Value:
GENERATE_TRAVERSE_METHOD(CLASS, BASE) \
GENERATE_WALKUP_AND_VISIT_METHODS(CLASS, BASE)
#define GENERATE_TRAVERSE_METHOD(CLASS, BASE)
Definition: APISetVisitor.h:92

Definition at line 107 of file APISetVisitor.h.

◆ CONCRETE_RECORD [2/2]

#define CONCRETE_RECORD (   CLASS,
  BASE,
  KIND 
)
Value:
case APIRecord::KIND: { \
TRY_TO(traverse##CLASS(static_cast<const CLASS *>(Record))); \
break; \
}
llvm::MachO::Record Record
Definition: MachO.h:31

Definition at line 107 of file APISetVisitor.h.

◆ GENERATE_TRAVERSE_METHOD

#define GENERATE_TRAVERSE_METHOD (   CLASS,
  BASE 
)
Value:
bool traverse##CLASS(const CLASS *Record) { \
TRY_TO(walkUpFrom##CLASS(Record)); \
TRY_TO(traverseRecordContext(dyn_cast<RecordContext>(Record))); \
return true; \
}

Definition at line 92 of file APISetVisitor.h.

◆ GENERATE_WALKUP_AND_VISIT_METHODS

#define GENERATE_WALKUP_AND_VISIT_METHODS (   CLASS,
  BASE 
)
Value:
bool walkUpFrom##CLASS(const CLASS *Record) { \
TRY_TO(walkUpFrom##BASE(Record)); \
TRY_TO(visit##CLASS(Record)); \
return true; \
} \
bool visit##CLASS(const CLASS *Record) { return true; }

Definition at line 99 of file APISetVisitor.h.

◆ TRY_TO

#define TRY_TO (   CALL_EXPR)
Value:
do { \
if (!getDerived()->CALL_EXPR) \
return false; \
} while (false)

Definition at line 26 of file APISetVisitor.h.