Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Clang CC

<< < (38/48) > >>

yvesdm3000:
Yes I was allready thinking about splitting off this feature since it's not directly using anything from libclang itself, it's currently only recycling some plugin internal utility function. I'm glad you agree.

While using the clang codecompletion I noticed the plugin doesn't handle paths with spaces correctly yet, so that will be fixed soon.

Yves

yvesdm3000:

--- Quote from: oBFusCATed on December 09, 2016, 09:06:07 pm ---How does this plugin gather and feed the files and flags to clang?
Can it use a compiler database?

--- End quote ---

I guess you are need the compilation flags to come out of the compiler_commands.json that is generated from ninja ?

It can't do that right now, but I can't imagine it's difficult to add.

Yves

oBFusCATed:

--- Quote from: yvesdm3000 on December 10, 2016, 01:23:08 pm ---I guess you are need the compilation flags to come out of the compiler_commands.json that is generated from ninja ?

--- End quote ---
Yes, the cb project generated by cmake doesn't contain flags (it is custom makefile based project), so the cc will have very hard time gathering them.
Probably we can add a field in the project with the path of the compilation database and then the CC could use it.
We can also teach other tools and plugins to use it.

yvesdm3000:

--- Quote from: oBFusCATed on December 10, 2016, 02:02:44 pm ---
--- Quote from: yvesdm3000 on December 10, 2016, 01:23:08 pm ---I guess you are need the compilation flags to come out of the compiler_commands.json that is generated from ninja ?

--- End quote ---
Yes, the cb project generated by cmake doesn't contain flags (it is custom makefile based project), so the cc will have very hard time gathering them.
Probably we can add a field in the project with the path of the compilation database and then the CC could use it.
We can also teach other tools and plugins to use it.

--- End quote ---
My main job's project is also using a custom makefile. I simply mirror the compiler options enough so that ClangCC is working fine. To change options, i switch from custom makefile to cb, set an option and then toggle the custom makefile option back to 'on'. I'm not sure this is a bug in cb to be able to query the compile options when the custom makefile option is on but it sure is handy for me.

Yves

yvesdm3000:
Pushed a new feature on the 'staging' branch where for each #include, it now adds a warning/error in case the specified header has a warning/error.

I doesn't work (yet) with multiple levels though (a header that includes a header that includes a header that has an error). I specifically didn't do this yet because it should filter out system headers for warnings (passed with -isystem) and the programmer isn't supposed to fix warnings in system headers..

Yves

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version