Watch
1
0
Fork
You've already forked libclangmm
0
mirror of https://gitlab.com/cppit/libclangmm.git synced 2026-11-10 14:33:13 +01:00
No description
  • C++ 89.1%
  • CMake 10.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-01 14:47:21 +02:00
cmake_modules Updated FindLibClang 2026-09-01 14:47:21 +02:00
docs Moved to GitLab 2018-06-11 20:17:05 +02:00
src Removed unused variable 2023-04-06 08:48:38 +02:00
tests Renamed C++ header and source files to use proper C++ file extensions. 2020-06-04 11:39:03 +02:00
.appveyor.sh Updated CI 2018-06-19 10:45:33 +02:00
.appveyor.yml Updated CI 2018-06-19 10:45:33 +02:00
.clang-format Formatted code with custom clang-format 2018-07-08 21:34:34 +02:00
.gitignore Initial commit 2015-05-16 12:32:42 +02:00
.gitlab-ci.yml Updated CI 2018-06-19 10:45:33 +02:00
CMakeLists.txt Updated minimum cmake version 2025-01-07 12:06:25 +01:00
LICENSE Update license year 2020-02-14 09:09:39 +01:00
README.md Formatted code with custom clang-format 2018-07-08 21:34:34 +02:00

libclangmm

an easy-to-use C++ wrapper for libclang

About

Provides C++ bindings and class structure to the libclang C library.

Developed for juCi++, a lightweight, platform-independent C++ IDE.

Dependencies

  • libclang

Installation

See installation guide

Tests

To run the unit tests:

mkdir build && cd build
cmake -DBUILD_TESTING=1 ..
make
make test

Coding style

Due to poor lambda support in clang-format, a custom clang-format is used with the following patch applied:

diff --git a/lib/Format/ContinuationIndenter.cpp b/lib/Format/ContinuationIndenter.cpp
index bb8efd61a3..e80a487055 100644
--- a/lib/Format/ContinuationIndenter.cpp
+++ b/lib/Format/ContinuationIndenter.cpp
@@ -276,6 +276,8 @@ LineState ContinuationIndenter::getInitialState(unsigned FirstIndent,
 }
 
 bool ContinuationIndenter::canBreak(const LineState &State) {
+  if(Style.ColumnLimit==0)
+    return true;
   const FormatToken &Current = *State.NextToken;
   const FormatToken &Previous = *Current.Previous;
   assert(&Previous == Current.Previous);
@@ -325,6 +327,8 @@ bool ContinuationIndenter::canBreak(const LineState &State) {
 }
 
 bool ContinuationIndenter::mustBreak(const LineState &State) {
+  if(Style.ColumnLimit==0)
+    return false;
   const FormatToken &Current = *State.NextToken;
   const FormatToken &Previous = *Current.Previous;
   if (Current.MustBreakBefore || Current.is(TT_InlineASMColon))