clang 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::SrcMgr::SLocEntry Class Reference

This is a discriminated union of FileInfo and ExpansionInfo. More...

#include "clang/Basic/SourceManager.h"

Public Member Functions

 SLocEntry ()
 
SourceLocation::UIntTy getOffset () const
 
bool isExpansion () const
 
bool isFile () const
 
const FileInfogetFile () const
 
const ExpansionInfogetExpansion () const
 

Static Public Member Functions

static SLocEntry getOffsetOnly (SourceLocation::UIntTy Offset)
 Creates an incomplete SLocEntry that is only able to report its offset.
 
static SLocEntry get (SourceLocation::UIntTy Offset, const FileInfo &FI)
 
static SLocEntry get (SourceLocation::UIntTy Offset, const ExpansionInfo &Expansion)
 

Detailed Description

This is a discriminated union of FileInfo and ExpansionInfo.

SourceManager keeps an array of these objects, and they are uniquely identified by the FileID datatype.

Definition at line 481 of file SourceManager.h.

Constructor & Destructor Documentation

◆ SLocEntry()

clang::SrcMgr::SLocEntry::SLocEntry ( )
inline

Definition at line 492 of file SourceManager.h.

Member Function Documentation

◆ get() [1/2]

static SLocEntry clang::SrcMgr::SLocEntry::get ( SourceLocation::UIntTy  Offset,
const ExpansionInfo Expansion 
)
inlinestatic

Definition at line 526 of file SourceManager.h.

References Expansion.

◆ get() [2/2]

static SLocEntry clang::SrcMgr::SLocEntry::get ( SourceLocation::UIntTy  Offset,
const FileInfo FI 
)
inlinestatic

Definition at line 517 of file SourceManager.h.

References File.

◆ getExpansion()

const ExpansionInfo & clang::SrcMgr::SLocEntry::getExpansion ( ) const
inline

◆ getFile()

const FileInfo & clang::SrcMgr::SLocEntry::getFile ( ) const
inline

◆ getOffset()

SourceLocation::UIntTy clang::SrcMgr::SLocEntry::getOffset ( ) const
inline

◆ getOffsetOnly()

static SLocEntry clang::SrcMgr::SLocEntry::getOffsetOnly ( SourceLocation::UIntTy  Offset)
inlinestatic

Creates an incomplete SLocEntry that is only able to report its offset.

Definition at line 510 of file SourceManager.h.

◆ isExpansion()

bool clang::SrcMgr::SLocEntry::isExpansion ( ) const
inline

◆ isFile()

bool clang::SrcMgr::SLocEntry::isFile ( ) const
inline

Member Data Documentation

◆ Expansion

ExpansionInfo clang::SrcMgr::SLocEntry::Expansion

Definition at line 488 of file SourceManager.h.

Referenced by get(), and getExpansion().

◆ File

FileInfo clang::SrcMgr::SLocEntry::File

Definition at line 487 of file SourceManager.h.

Referenced by get(), and getFile().


The documentation for this class was generated from the following file: