class PresumedLoc

Declaration

class PresumedLoc { /* full declaration omitted */ };

Description

Represents an unpacked "presumed" location which can be presented to the user. A 'presumed' location can be modified by # line and GNU line marker directives and is always the expansion point of a normal location. You can get a PresumedLoc from a SourceLocation with SourceManager.

Declared at: clang/include/clang/Basic/SourceLocation.h:302

Member Variables

private const char* Filename = nullptr
private clang::FileID ID
private unsigned int Line
private unsigned int Col
private clang::SourceLocation IncludeLoc

Method Overview

Methods

PresumedLoc()

Declared at: clang/include/clang/Basic/SourceLocation.h:309

PresumedLoc(const char* FN,
            clang::FileID FID,
            unsigned int Ln,
            unsigned int Co,
            clang::SourceLocation IL)

Declared at: clang/include/clang/Basic/SourceLocation.h:310

Parameters

const char* FN
clang::FileID FID
unsigned int Ln
unsigned int Co
clang::SourceLocation IL

unsigned int getColumn() const

Description

Return the presumed column number of this location. This cannot be affected by # line, but is packaged here for convenience.

Declared at: clang/include/clang/Basic/SourceLocation.h:345

clang::FileID getFileID() const

Declared at: clang/include/clang/Basic/SourceLocation.h:329

const char* getFilename() const

Description

Return the presumed filename of this location. This can be affected by # line etc.

Declared at: clang/include/clang/Basic/SourceLocation.h:324

clang::SourceLocation getIncludeLoc() const

Description

Return the presumed include location of this location. This can be affected by GNU linemarker directives.

Declared at: clang/include/clang/Basic/SourceLocation.h:353

unsigned int getLine() const

Description

Return the presumed line number of this location. This can be affected by # line etc.

Declared at: clang/include/clang/Basic/SourceLocation.h:337

bool isInvalid() const

Description

Return true if this object is invalid or uninitialized. This occurs when created with invalid source locations or when walking off the top of a # include stack.

Declared at: clang/include/clang/Basic/SourceLocation.h:318

bool isValid() const

Declared at: clang/include/clang/Basic/SourceLocation.h:319