ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
Loading...
Searching...
No Matches
acav::SourceRange Class Reference

Represents a span of source code (begin to end). More...

#include <SourceLocation.h>

Public Member Functions

 SourceRange (SourceLocation begin, SourceLocation end)
SourceLocation begin () const
SourceLocation end () const

Static Public Member Functions

static SourceRange fromClang (const clang::SourceRange &range, const clang::SourceManager &sm, FileManager &fileMgr)
 Create SourceRange from Clang's SourceRange.
static void resetCache ()
 Reset internal caches (per extraction run).

Detailed Description

Represents a span of source code (begin to end).

Memory layout: 24 bytes (2 × SourceLocation)

Definition at line 75 of file SourceLocation.h.

Constructor & Destructor Documentation

◆ SourceRange()

acav::SourceRange::SourceRange ( SourceLocation begin,
SourceLocation end )

Definition at line 122 of file SourceLocation.cpp.

Member Function Documentation

◆ begin()

SourceLocation acav::SourceRange::begin ( ) const
inline

Definition at line 80 of file SourceLocation.h.

◆ end()

SourceLocation acav::SourceRange::end ( ) const
inline

Definition at line 81 of file SourceLocation.h.

◆ fromClang()

SourceRange acav::SourceRange::fromClang ( const clang::SourceRange & range,
const clang::SourceManager & sm,
FileManager & fileMgr )
static

Create SourceRange from Clang's SourceRange.

Parameters
rangeClang source range
smClang source manager
fileMgrFileManager for path registration
Returns
ACAV SourceRange

Definition at line 125 of file SourceLocation.cpp.

References acav::SourceLocation::fromClang(), and acav::FileManager::InvalidFileID.


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