class APNumericStorage

Declaration

class APNumericStorage { /* full declaration omitted */ };

Description

Used by IntegerLiteral/FloatingLiteral to store the numeric without leaking memory. For large floats/integers, APFloat/APInt will allocate memory from the heap to represent these numbers. Unfortunately, when we use a BumpPtrAllocator to allocate IntegerLiteral/FloatingLiteral nodes the memory associated with the APFloat/APInt values will never get freed. APNumericStorage uses ASTContext's allocator for memory allocation.

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

Member Variables

private anonymous struct / union
private unsigned int BitWidth

Method Overview

Methods

APNumericStorage(const clang::APNumericStorage&)

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

Parameters

const clang::APNumericStorage&

APNumericStorage()

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

llvm::APInt getIntValue() const

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

bool hasAllocation() const

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

void setIntValue(const clang::ASTContext& C,
                 const llvm::APInt& Val)

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

Parameters

const clang::ASTContext& C
const llvm::APInt& Val