Commit db8a6d5b authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Added path to FixIT struct

parent 043d96d0
Pipeline #149261121 passed with stage
in 3 minutes and 1 second
......@@ -19,6 +19,7 @@ clangmm::Diagnostic::Diagnostic(CXTranslationUnit &cx_tu, CXDiagnostic &cx_diagn
for(unsigned c = 0; c < num_fix_its; c++) {
CXSourceRange fix_it_range;
auto source = to_string(clang_getDiagnosticFixIt(cx_diagnostic, c, &fix_it_range));
fix_its.emplace_back(source, SourceRange(fix_it_range).get_offsets());
auto range = SourceRange(fix_it_range);
fix_its.emplace_back(FixIt{std::move(source), range.get_start().get_path(), range.get_offsets()});
}
}
......@@ -19,11 +19,9 @@ namespace clangmm {
Fatal
};
class FixIt {
public:
FixIt(const std::string &source, const std::pair<clangmm::Offset, clangmm::Offset> &offsets)
: source(source), offsets(offsets) {}
struct FixIt {
std::string source;
std::string path;
std::pair<clangmm::Offset, clangmm::Offset> offsets;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment