mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
802 B
30 lines
802 B
#ifndef SOURCELOCATION_H_ |
|
#define SOURCELOCATION_H_ |
|
#include <clang-c/Index.h> |
|
#include <string> |
|
|
|
namespace clang { |
|
|
|
class SourceLocation { |
|
public: |
|
SourceLocation(const CXSourceLocation& cx_location) : cx_location(cx_location) {} |
|
|
|
SourceLocation(CXTranslationUnit &cx_tu, |
|
const std::string &filename, |
|
int line_number, |
|
int column); |
|
|
|
SourceLocation(CXTranslationUnit &tu, |
|
const std::string &filepath, |
|
int offset); |
|
|
|
void get_location_info(std::string *path, |
|
unsigned *line, |
|
unsigned *column, |
|
unsigned *offset); |
|
|
|
CXSourceLocation cx_location; |
|
}; |
|
|
|
} // namespace clang |
|
#endif // SOURCELOCATION_H_
|
|
|