clang API Documentation

Public Member Functions
clang::PresumedLoc Class Reference

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

#include <SourceLocation.h>

List of all members.

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.
bool isValid () const
const char * getFilename () const
 Return the presumed filename of this location.
unsigned getLine () const
 Return the presumed line number of this location.
unsigned getColumn () const
 Return the presumed column number of this location.
SourceLocation getIncludeLoc () const
 Return the presumed include location of this location.

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 355 of file SourceLocation.h.


Constructor & Destructor Documentation

Definition at line 360 of file SourceLocation.h.

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

Definition at line 361 of file SourceLocation.h.


Member Function Documentation

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

Return the presumed include location of this location.

This can be affected by GNU linemarker directives.

Definition at line 390 of file SourceLocation.h.

Referenced by ReadLineMarkerFlags().

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

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.

Definition at line 369 of file SourceLocation.h.

Referenced by clang::DoPrintPreprocessedInput(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::Preprocessor::HandlePragmaSystemHeader(), clang::SourceLocation::print(), and ReadLineMarkerFlags().

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

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