From 37795c7515e7030957ce1ebb0ef0dd325d2fe04e Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 2 Oct 2015 20:24:50 +0200 Subject: [PATCH 1/7] Added fix its to diagnostics. --- src/Diagnostic.cc | 10 +++++++++- src/Diagnostic.h | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Diagnostic.cc b/src/Diagnostic.cc index 03e7c28..fae7dde 100644 --- a/src/Diagnostic.cc +++ b/src/Diagnostic.cc @@ -14,6 +14,14 @@ 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; + }; + static const std::string get_severity_spelling(unsigned severity); unsigned severity; @@ -17,7 +23,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_ From 618b9068bc288015df6b83409f10881792c29022 Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 5 Oct 2015 10:56:17 +0200 Subject: [PATCH 2/7] Minor cleanup. --- src/Diagnostic.cc | 2 +- src/Diagnostic.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Diagnostic.cc b/src/Diagnostic.cc index fae7dde..2897352 100644 --- a/src/Diagnostic.cc +++ b/src/Diagnostic.cc @@ -19,7 +19,7 @@ clang::Diagnostic::Diagnostic(CXTranslationUnit& cx_tu, CXDiagnostic& cx_diagnos for(unsigned c=0;c offsets; }; From 5bd4a97b010045e392e39c04fabd18e79a171f05 Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 5 Oct 2015 11:06:39 +0200 Subject: [PATCH 3/7] More minor cleanup. --- src/Diagnostic.cc | 5 ++--- src/Diagnostic.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Diagnostic.cc b/src/Diagnostic.cc index 2897352..bd63da0 100644 --- a/src/Diagnostic.cc +++ b/src/Diagnostic.cc @@ -18,9 +18,8 @@ clang::Diagnostic::Diagnostic(CXTranslationUnit& cx_tu, CXDiagnostic& cx_diagnos unsigned num_fix_its=clang_getDiagnosticNumFixIts(cx_diagnostic); for(unsigned c=0;c &offsets): + source(source), offsets(offsets) {} std::string source; std::pair offsets; }; From e060dec32bb8306eff6f9114092cdbefe8fea5fb Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 5 Oct 2015 16:41:48 +0200 Subject: [PATCH 4/7] Fixed fix it bug. --- src/Diagnostic.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Diagnostic.cc b/src/Diagnostic.cc index bd63da0..d12bdcf 100644 --- a/src/Diagnostic.cc +++ b/src/Diagnostic.cc @@ -18,8 +18,8 @@ clang::Diagnostic::Diagnostic(CXTranslationUnit& cx_tu, CXDiagnostic& cx_diagnos unsigned num_fix_its=clang_getDiagnosticNumFixIts(cx_diagnostic); for(unsigned c=0;c Date: Thu, 8 Oct 2015 13:23:28 +0200 Subject: [PATCH 5/7] Added link to jucipp to README.md. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dee4f50..5644510 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ## 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 From b0518229e78b25734efd05642a21acd3ad84b180 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 8 Oct 2015 13:24:32 +0200 Subject: [PATCH 6/7] Minor type fix to README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5644510..c3b29bc 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## 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 +Developed for [juCi++](https://github.com/cppit/jucipp) - a lightweight platform independent C++-IDE. ## Dependencies ## * libclang From 83d27ab6181a57e324bf36107e5676862f774a4a Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 8 Oct 2015 13:26:31 +0200 Subject: [PATCH 7/7] Yet another minor type fix to README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3b29bc..14d4b6a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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.