ccls icon indicating copy to clipboard operation
ccls copied to clipboard

ccls handling of `--`

Open sceptical-coder opened this issue 2 years ago • 0 comments

Hi! First of all, please forgive for a very informal problem description...

My compile_commands.json which was generated by CMake and then processed by jq command from Wiki that is breaking .command to .arguments, contained -- (conventional "end of options" terminator) in arguments, after which source file names were placed. This led to indexing for some of my translation units not happening at all.

I debugged ccls and found out that arguments get .push_back()'ed with e.g. -fsyntax-only option. Of course, clang libraries do not respect control options after the conventional "end of options" terminator. I think, that there are other places in which this is happening, but finding them out after the simple fix at the place of insertion of -fsyntax-only did not help, seemed to me too hard w.r.t. priorities of other things to do.

Corrected Wiki for the workaround, BTW.

Platform: Win10 Version of ccls: current master Compiler driver: clang-cl

sceptical-coder avatar Sep 09 '22 12:09 sceptical-coder