clang: lib/Interpreter/InterpreterUtils.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

14

16

20}

21

26

30 assert(Result && "Cannot create CStyleCastPtrExpr");

32}

33

37}

38

41 DeclsInGroup.push_back(D);

43 return DeclGroupPtr;

44}

45

52 if (!Within)

54 else {

55 if (const auto *TD = dyn_castclang::TagDecl(Within);

56 TD && !TD->getDefinition())

57

58 return nullptr;

59

61 }

62

64 return nullptr;

65

67

68 return dyn_cast(R.getFoundDecl());

69}

70

75 RedeclarationKind::ForVisibleRedeclaration);

76

78

79 if (!Within)

81 else {

82 const DeclContext *PrimaryWithin = nullptr;

83 if (const auto *TD = dyn_cast(Within))

84 PrimaryWithin = llvm::dyn_cast_or_null(TD->getDefinition());

85 else

87

88

89 if (!PrimaryWithin)

90 return nullptr;

91

93 }

94

96 return nullptr;

98

100 return llvm::dyn_cast(R.getFoundDecl());

101

102 return nullptr;

103}

104

110}

111}

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

QualType getPointerType(QualType T) const

Return the uniqued reference to the type for a pointer to the specified type.

TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const

Allocate a TypeSourceInfo where all locations have been initialized to a given location,...

const clang::PrintingPolicy & getPrintingPolicy() const

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

DeclContext * getPrimaryContext()

getPrimaryContext - There may be many different declarations of the same entity (including forward de...

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

The name of a declaration.

This represents one expression.

IdentifierInfo & get(StringRef Name)

Return the identifier token info for the specified named identifier.

static IntegerLiteral * Create(const ASTContext &C, const llvm::APInt &V, QualType type, SourceLocation l)

Returns a new integer literal with value 'V' and type 'type'.

Represents the results of name lookup.

bool empty() const

Return true if no decls were found.

void resolveKind()

Resolves the result kind of the lookup, possibly hiding decls.

NamedDecl * getFoundDecl() const

Fetch the unique decl found by this lookup.

bool isSingleResult() const

Determines if this names a single result which is not an unresolved value using decl.

void suppressDiagnostics()

Suppress the diagnostics that would normally fire because of this lookup.

This represents a decl that may have a name.

Represent a C++ namespace.

Wrapper for void* pointer.

A (possibly-)qualified type.

static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)

Sema - This implements semantic analysis and AST building for C.

@ LookupOrdinaryName

Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc....

@ LookupNestedNameSpecifierName

Look up of a name that precedes the '::' scope resolution operator in C++.

ASTContext & getASTContext() const

ExprResult BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)

DeclGroupPtrTy BuildDeclaratorGroup(MutableArrayRef< Decl * > Group)

BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necess...

Scope * TUScope

Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in...

bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)

Perform qualified name lookup into a given context.

bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation=false, bool ForceNoCPlusPlus=false)

Perform unqualified name lookup starting from a given scope.

Encodes a location in the source.

A container of type source information.

bool isPointerType() const

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

NamedDecl * LookupNamed(Sema &S, llvm::StringRef Name, const DeclContext *Within)

Sema::DeclGroupPtrTy CreateDGPtrFrom(Sema &S, Decl *D)

std::string GetFullTypeName(ASTContext &Ctx, QualType QT)

@ Result

The result type of a method or function.

IntegerLiteral * IntegerLiteralExpr(ASTContext &C, uint64_t Val)

NamespaceDecl * LookupNamespace(Sema &S, llvm::StringRef Name, const DeclContext *Within)

Expr * CStyleCastPtrExpr(Sema &S, QualType Ty, Expr *E)

__UINTPTR_TYPE__ uintptr_t

An unsigned integer type with the property that any valid pointer to void can be converted to this ty...

Describes how types, statements, expressions, and declarations should be printed.

unsigned AnonymousTagLocations

When printing an anonymous tag name, also print the location of that entity (e.g.,...

unsigned SuppressScope

Suppresses printing of scope specifiers.