class SourceLocExpr

Declaration

class SourceLocExpr : public Expr { /* full declaration omitted */ };

Description

Represents a function call to one of __builtin_LINE(), __builtin_COLUMN(), __builtin_FUNCTION(), __builtin_FILE(), or __builtin_source_location().

Declared at: clang/include/clang/AST/Expr.h:4682

Inherits from: Expr

Member Variables

private clang::SourceLocation BuiltinLoc
private clang::SourceLocation RParenLoc
private clang::DeclContext* ParentContext

Inherited from Stmt:

protected

Method Overview

  • public clang::APValue EvaluateInContext(const clang::ASTContext & Ctx, const clang::Expr * DefaultExpr) const
  • public SourceLocExpr(const clang::ASTContext & Ctx, clang::SourceLocExpr::IdentKind Type, clang::QualType ResultTy, clang::SourceLocation BLoc, clang::SourceLocation RParenLoc, clang::DeclContext * Context)
  • public SourceLocExpr(clang::Stmt::EmptyShell Empty)
  • public clang::Stmt::child_range children()
  • public clang::Stmt::const_child_range children() const
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public llvm::StringRef getBuiltinStr() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocExpr::IdentKind getIdentKind() const
  • public clang::SourceLocation getLocation() const
  • public const clang::DeclContext * getParentContext() const
  • public clang::DeclContext * getParentContext()
  • public bool isIntType() const

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

clang::APValue EvaluateInContext(
    const clang::ASTContext& Ctx,
    const clang::Expr* DefaultExpr) const

Description

Return the result of evaluating this SourceLocExpr in the specified (and possibly null) default argument or initialization context.

Declared at: clang/include/clang/AST/Expr.h:4698

Parameters

const clang::ASTContext& Ctx
const clang::Expr* DefaultExpr

SourceLocExpr(
    const clang::ASTContext& Ctx,
    clang::SourceLocExpr::IdentKind Type,
    clang::QualType ResultTy,
    clang::SourceLocation BLoc,
    clang::SourceLocation RParenLoc,
    clang::DeclContext* Context)

Declared at: clang/include/clang/AST/Expr.h:4689

Parameters

const clang::ASTContext& Ctx
clang::SourceLocExpr::IdentKind Type
clang::QualType ResultTy
clang::SourceLocation BLoc
clang::SourceLocation RParenLoc
clang::DeclContext* Context

SourceLocExpr(clang::Stmt::EmptyShell Empty)

Description

Build an empty call expression.

Declared at: clang/include/clang/AST/Expr.h:4694

Parameters

clang::Stmt::EmptyShell Empty

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Expr.h:4730

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Expr.h:4734

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Expr.h:4738

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:4727

llvm::StringRef getBuiltinStr() const

Description

Return a string representing the name of the specific builtin function.

Declared at: clang/include/clang/AST/Expr.h:4702

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:4728

clang::SourceLocExpr::IdentKind getIdentKind()
    const

Declared at: clang/include/clang/AST/Expr.h:4704

clang::SourceLocation getLocation() const

Declared at: clang/include/clang/AST/Expr.h:4726

const clang::DeclContext* getParentContext() const

Description

If the SourceLocExpr has been resolved return the subexpression representing the resolved value. Otherwise return null.

Declared at: clang/include/clang/AST/Expr.h:4723

clang::DeclContext* getParentContext()

Declared at: clang/include/clang/AST/Expr.h:4724

bool isIntType() const

Declared at: clang/include/clang/AST/Expr.h:4708