clang-tags
C/C++ source code indexing tool based on libclang
|
Location in the source code. More...
#include <sourceLocation.hxx>
Classes | |
struct | Position |
Physical position in the source code. More... |
Public Member Functions | |
bool | operator== (const SourceLocation &other) const |
Equality operator. | |
const Position | expansionLocation () const |
Get the associated physical position. |
Friends | |
class | TranslationUnit |
class | Cursor |
Location in the source code.
This class is a proxy for libclang's CXSourceLocation
type. It should provide the same features.
A physical source location is mainly identified by the parameters in a Position structure, a retrieved by the expansionLocation() method.
Note that a source location can be associated to different physical locations, especially in the case of macro expansions, which can either refer to the actual expansion, or the macro definition.
const SourceLocation::Position LibClang::SourceLocation::expansionLocation | ( | ) | const |
Get the associated physical position.
If the location refers to a macro expansion, return the position of the expansion itself, instead of the macro definition.
bool LibClang::SourceLocation::operator== | ( | const SourceLocation & | other | ) | const |
Equality operator.
other | SourceLocation to be compared with |