diff --git a/README.md b/README.md index dee4f50..14d4b6a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# libclangmm - An easy to use C++-wrapper for libclang # +# libclangmm - an easy to use C++-wrapper for libclang # ## About ## Provides C++ bindings and class structure to the [libclang](http://www.llvm.org) C library. + +Developed for [juCi++](https://github.com/cppit/jucipp) - a lightweight platform independent C++-IDE. ## Dependencies ## * libclang diff --git a/src/Diagnostic.cc b/src/Diagnostic.cc index 03e7c28..d12bdcf 100644 --- a/src/Diagnostic.cc +++ b/src/Diagnostic.cc @@ -14,6 +14,13 @@ clang::Diagnostic::Diagnostic(CXTranslationUnit& cx_tu, CXDiagnostic& cx_diagnos clang::Tokens tokens(cx_tu, SourceRange(start_location, start_location)); if(tokens.size()==1) offsets={start_offset, tokens.begin()->offsets.second}; + + unsigned num_fix_its=clang_getDiagnosticNumFixIts(cx_diagnostic); + for(unsigned c=0;c &offsets): + source(source), offsets(offsets) {} + std::string source; + std::pair offsets; + }; + static const std::string get_severity_spelling(unsigned severity); unsigned severity; @@ -17,7 +25,8 @@ namespace clang { std::string spelling; std::string path; std::pair offsets; + std::vector fix_its; }; } -#endif // DIAGNOSTIC_H_ \ No newline at end of file +#endif // DIAGNOSTIC_H_