Author Topic: ClangComplete plugin  (Read 82454 times)

Offline Lalaland

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: ClangComplete plugin
« Reply #45 on: November 22, 2011, 11:08:55 pm »
As promised, here are some pictures(I wanted to refactor the code first):



And this is the same code that the current code completion could not handle


EDIT: I am now also using the previously suggested code for manually adding in gcc's search paths.
« Last Edit: November 22, 2011, 11:54:00 pm by Lalaland »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: ClangComplete plugin
« Reply #46 on: November 23, 2011, 01:48:07 am »
As promised, here are some pictures(I wanted to refactor the code first):



And this is the same code that the current code completion could not handle


EDIT: I am now also using the previously suggested code for manually adding in gcc's search paths.
Wonderful job!
I will take time to check it works under Windows+mingw. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6034
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: ClangComplete plugin
« Reply #47 on: November 23, 2011, 03:09:22 am »
Hi, found another clang plugin:
A Small Matter of Programming: A Vim plugin for navigating C++ with libclang

which can navigate in C++ source code. :D :D :D

Edit:
Another one:
https://github.com/jessevdk/gedit-code-assistance
« Last Edit: November 23, 2011, 03:14:04 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Lalaland

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: ClangComplete plugin
« Reply #48 on: November 23, 2011, 06:45:26 am »
I now have actual file control, with a calltip if the file is not done yet. I am using a map of translation units to filenames, and it tries to compile all of the files in a project on project load.

That was the last goal on the list, so it is going to be time to make a new list of stuff to do ...

Sadly I am going to have to ditch accessablity, no-one replied to my email on the clang mailing list, and I want to be able to use the official precompiled libclang libraries.
« Last Edit: November 23, 2011, 08:58:33 am by Lalaland »

Apxont

  • Guest
Re: ClangComplete plugin
« Reply #49 on: December 02, 2011, 07:07:27 pm »
Is possible to save all clang trans units to cache, and then recreate them from cache without reparsing them from files by standart methods, or recreation must be implemented by programmer?

Offline Lalaland

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: ClangComplete plugin
« Reply #50 on: December 03, 2011, 07:12:44 am »
According to the API, clang should be caching it's results for individual translation units. I am also holding onto translation units for files.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: ClangComplete plugin
« Reply #51 on: September 30, 2012, 04:57:00 am »
Has anyone successfully used this plugin recently?

I managed to build it on linux after fixing some weird includes, but so far trying to run i either get segfaults or a completion tip that says it is still parsing. Any tips?