clang 22.0.0git
APISetVisitor.h File Reference

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

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)
#define RECORD(CLASS, BASE)
#define RECORD_CONTEXT(CLASS, KIND)
#define CONCRETE_RECORD(CLASS, BASE, KIND)
#define ABSTRACT_RECORD(CLASS, BASE)
#define RECORD(CLASS, BASE)
#define RECORD_CONTEXT(CLASS, KIND)

Detailed Description

This file defines the ExtractAPI APISetVisitor interface.

Definition in file APISetVisitor.h.

Macro Definition Documentation

◆ ABSTRACT_RECORD [1/2]

#define ABSTRACT_RECORD ( CLASS,
BASE )
Value:
RECORD(CLASS, BASE)
#define RECORD(CLASS, BASE)

Definition at line 111 of file APISetVisitor.h.

◆ ABSTRACT_RECORD [2/2]

#define ABSTRACT_RECORD ( CLASS,
BASE )
Value:
#define 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 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.

◆ RECORD [1/2]

#define RECORD ( CLASS,
BASE )

Referenced by AddStmtsExprs().

◆ RECORD [2/2]

#define RECORD ( CLASS,
BASE )

◆ RECORD_CONTEXT [1/2]

#define RECORD_CONTEXT ( CLASS,
KIND )

◆ RECORD_CONTEXT [2/2]

#define RECORD_CONTEXT ( CLASS,
KIND )

◆ 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.