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.

26 lines
674 B

11 years ago
#ifndef SOURCELOCATION_H_
#define SOURCELOCATION_H_
#include <clang-c/Index.h>
#include <string>
11 years ago
namespace clang {
11 years ago
class SourceLocation {
public:
SourceLocation(const CXSourceLocation& cx_location) : cx_location(cx_location) {}
SourceLocation(CXTranslationUnit &cx_tu,
11 years ago
const std::string &filename,
int line_number,
int column);
11 years ago
SourceLocation(CXTranslationUnit &tu, const std::string &filepath, int offset);
11 years ago
11 years ago
void get_data(std::string *path, unsigned *line, unsigned *column, unsigned *offset);
11 years ago
CXSourceLocation cx_location;
11 years ago
};
} // namespace clang
#endif // SOURCELOCATION_H_