|
ACAV f0ba4b7c9529
Abstract Syntax Tree (AST) visualization tool for C, C++, and Objective-C
|
Represents a specific position in source code. More...
#include <SourceLocation.h>
Public Member Functions | |
| SourceLocation (FileID fileId, unsigned line, unsigned column) | |
| FileID | fileID () const |
| unsigned | line () const |
| unsigned | column () const |
| bool | isValid () const |
Static Public Member Functions | |
| static SourceLocation | fromClang (const clang::SourceLocation &loc, const clang::SourceManager &sm, FileManager &fileMgr) |
| Create SourceLocation from Clang's SourceLocation. | |
| static void | resetCache () |
| Reset internal caches (per extraction run). | |
Represents a specific position in source code.
Uses FileID (compact integer) + line + column coordinates. FileID 0 = invalid (for compiler-generated code).
Memory layout: 12 bytes (4 + 4 + 4)
Definition at line 44 of file SourceLocation.h.
| acav::SourceLocation::SourceLocation | ( | FileID | fileId, |
| unsigned | line, | ||
| unsigned | column ) |
Definition at line 61 of file SourceLocation.cpp.
|
inline |
Definition at line 51 of file SourceLocation.h.
|
inline |
Definition at line 49 of file SourceLocation.h.
|
static |
Create SourceLocation from Clang's SourceLocation.
| loc | Clang source location |
| sm | Clang source manager |
| fileMgr | FileManager for path registration |
Definition at line 64 of file SourceLocation.cpp.
References fromClang(), acav::FileManager::InvalidFileID, acav::FileManager::registerFile(), and acav::FileManager::tryGetFileId().
Referenced by fromClang(), and acav::SourceRange::fromClang().
|
inline |
Definition at line 52 of file SourceLocation.h.
|
inline |
Definition at line 50 of file SourceLocation.h.
|
static |
Reset internal caches (per extraction run).
Definition at line 186 of file SourceLocation.cpp.
Referenced by acav::AstExtractorRunner::run().