clang: lib/Serialization/ASTCommon.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_CLANG_LIB_SERIALIZATION_ASTCOMMON_H

14#define LLVM_CLANG_LIB_SERIALIZATION_ASTCOMMON_H

15

20

22

24

49

51

53

54

55

56

57

58

59

60

61

62

63

65

66

68

69

70

72

73

74

76 Fn Visit) {

77 unsigned Index = 0;

78 for (Decl *LexicalD : DC->decls()) {

79

80 if (auto *FD = dyn_cast(LexicalD))

81 LexicalD = FD->getFriendDecl();

82

83 auto *ND = dyn_cast_or_null(LexicalD);

85 continue;

86

87 Visit(ND, Index++);

88 }

89}

90

91

92

93

94

97 return true;

98

99

100

101 if (auto *VD = dyn_cast(D))

103 return false;

104}

105

106}

107

108}

109

110#endif

Defines the clang::ASTContext interface.

Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.

This class is used for builtin types like 'int'.

DeclContext - This is used only as base class of specific decl types that can act as declaration cont...

decl_range decls() const

decls_begin/decls_end - Iterate over the declarations stored in this context.

Decl - This represents one declaration (or definition), e.g.

This represents a decl that may have a name.

Smart pointer class that efficiently represents Objective-C method names.

bool isRedeclarableDeclKind(unsigned Kind)

Determine whether the given declaration kind is redeclarable.

TypeIdx TypeIdxFromBuiltin(const BuiltinType *BT)

bool needsAnonymousDeclarationNumber(const NamedDecl *D)

Determine whether the given declaration needs an anonymous declaration number.

void numberAnonymousDeclsWithin(const DeclContext *DC, Fn Visit)

Visit each declaration within DC that needs an anonymous declaration number and call Visit with the d...

Definition ASTCommon.h:75

const DeclContext * getDefinitiveDeclContext(const DeclContext *DC)

Retrieve the "definitive" declaration that provides all of the visible entries for the given declarat...

unsigned ComputeHash(Selector Sel)

bool isPartOfPerModuleInitializer(const Decl *D)

Determine whether the given declaration will be included in the per-module initializer if it needs to...

Definition ASTCommon.h:95

DeclUpdateKind

Definition ASTCommon.h:25

@ DeclMarkedOpenMPThreadPrivate

Definition ASTCommon.h:40

@ CXXResolvedDtorGlobArrayDelete

Definition ASTCommon.h:47

@ StaticLocalNumber

Definition ASTCommon.h:39

@ CXXInstantiatedClassDefinition

Definition ASTCommon.h:31

@ CXXResolvedExceptionSpec

Definition ASTCommon.h:35

@ CXXResolvedDtorArrayDelete

Definition ASTCommon.h:46

@ CXXInstantiatedDefaultArgument

Definition ASTCommon.h:32

@ ManglingNumber

Definition ASTCommon.h:38

@ CXXDeducedReturnType

Definition ASTCommon.h:36

@ CXXAddedImplicitMember

Definition ASTCommon.h:26

@ CXXInstantiatedDefaultMemberInitializer

Definition ASTCommon.h:33

@ DeclExported

Definition ASTCommon.h:43

@ CXXResolvedDtorDelete

Definition ASTCommon.h:34

@ CXXAddedAnonymousNamespace

Definition ASTCommon.h:27

@ CXXResolvedDtorGlobDelete

Definition ASTCommon.h:45

@ CXXAddedFunctionDefinition

Definition ASTCommon.h:28

@ CXXPointOfInstantiation

Definition ASTCommon.h:30

@ DeclMarkedUsed

Definition ASTCommon.h:37

@ AddedAttrToRecord

Definition ASTCommon.h:44

@ DeclMarkedOpenMPDeclareTarget

Definition ASTCommon.h:42

@ DeclMarkedOpenMPAllocate

Definition ASTCommon.h:41

@ CXXAddedVarDefinition

Definition ASTCommon.h:29

The JSON file list parser is used to communicate input to InstallAPI.

bool isa(CodeGen::Address addr)

bool isTemplateInstantiation(TemplateSpecializationKind Kind)

Determine whether this template specialization kind refers to an instantiation of an entity (as oppos...