clang 20.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
 
FileInfogetFile ()
 
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 530 of file SourceManager.h.

References E, and Expansion.

◆ get() [2/2]

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

Definition at line 521 of file SourceManager.h.

References E.

◆ getExpansion()

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

◆ getFile() [1/2]

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

Definition at line 503 of file SourceManager.h.

References File, and isFile().

◆ getFile() [2/2]

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 514 of file SourceManager.h.

References E.

◆ 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 getFile().


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