clang  6.0.0svn
Public Member Functions | List of all members
clang::PresumedLoc Class Reference

Represents an unpacked "presumed" location which can be presented to the user. More...

#include "clang/Basic/SourceLocation.h"

Public Member Functions

 PresumedLoc ()
 
 PresumedLoc (const char *FN, unsigned Ln, unsigned Co, SourceLocation IL)
 
bool isInvalid () const
 Return true if this object is invalid or uninitialized. More...
 
bool isValid () const
 
const char * getFilename () const
 Return the presumed filename of this location. More...
 
unsigned getLine () const
 Return the presumed line number of this location. More...
 
unsigned getColumn () const
 Return the presumed column number of this location. More...
 
SourceLocation getIncludeLoc () const
 Return the presumed include location of this location. More...
 

Detailed 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.

Definition at line 276 of file SourceLocation.h.

Constructor & Destructor Documentation

◆ PresumedLoc() [1/2]

clang::PresumedLoc::PresumedLoc ( )
inline

Definition at line 282 of file SourceLocation.h.

◆ PresumedLoc() [2/2]

clang::PresumedLoc::PresumedLoc ( const char *  FN,
unsigned  Ln,
unsigned  Co,
SourceLocation  IL 
)
inline

Definition at line 283 of file SourceLocation.h.

Member Function Documentation

◆ getColumn()

unsigned clang::PresumedLoc::getColumn ( ) const
inline

Return the presumed column number of this location.

This cannot be affected by #line, but is packaged here for convenience.

Definition at line 312 of file SourceLocation.h.

Referenced by clang::TextDiagnostic::emitDiagnosticLoc(), clang::getParameterABISpelling(), clang::SourceManager::getPresumedColumnNumber(), clang::LogDiagnosticPrinter::HandleDiagnostic(), and clang::SourceLocation::print().

◆ getFilename()

const char* clang::PresumedLoc::getFilename ( ) const
inline

◆ getIncludeLoc()

SourceLocation clang::PresumedLoc::getIncludeLoc ( ) const
inline

Return the presumed include location of this location.

This can be affected by GNU linemarker directives.

Definition at line 320 of file SourceLocation.h.

Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), ExpectFeatureIdentifierInfo(), and ReadLineMarkerFlags().

◆ getLine()

unsigned clang::PresumedLoc::getLine ( ) const
inline

◆ isInvalid()

bool clang::PresumedLoc::isInvalid ( ) const
inline

◆ isValid()

bool clang::PresumedLoc::isValid ( ) const
inline

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