clang  14.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"

Collaboration diagram for clang::SrcMgr::SLocEntry:
Collaboration graph
[legend]

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

Constructor & Destructor Documentation

◆ SLocEntry()

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

Definition at line 477 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 503 of file SourceManager.h.

References Expansion, and Offset.

◆ get() [2/2]

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

Definition at line 494 of file SourceManager.h.

References File, and Offset.

◆ 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

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

Referenced by get(), and getExpansion().

◆ File

FileInfo clang::SrcMgr::SLocEntry::File

Definition at line 472 of file SourceManager.h.

Referenced by get(), and getFile().


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