clang 22.0.0git
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.

References File.

Referenced by get(), get(), getFile(), and getOffsetOnly().

Member Function Documentation

◆ get() [1/2]

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

Definition at line 530 of file SourceManager.h.

References Expansion, and SLocEntry().

◆ get() [2/2]

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

Definition at line 521 of file SourceManager.h.

References File, and SLocEntry().

◆ getExpansion()

◆ getFile() [1/2]

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

Definition at line 503 of file SourceManager.h.

References File, and isFile().

◆ getFile() [2/2]

◆ getOffset()

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

◆ getOffsetOnly()

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 SLocEntry().

◆ isExpansion()

◆ isFile()

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(), getFile(), and SLocEntry().


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