rdnetto / YCM-Generator

Generates config files for YouCompleteMe (https://github.com/Valloric/YouCompleteMe)
GNU General Public License v3.0
917 stars 128 forks source link

unwanted flag "c++" in the flags #112

Closed GrandZhuo closed 6 years ago

GrandZhuo commented 6 years ago

Thank you very much for your code! I found a bug when using YCM-Generator. There is a "c++" in the flags. Here is a part of the flags. flags = [ '-x', 'c++', '-D_GNU_SOURCE', '-D_REENTRANT', ]

It's ok to delete it or replace it with -c++ in my project.

Also, if I write "-I../include/" in Makefile, there will be a '-I../include/' in the flags. But the right flag must be '-I../include'. The symbol '/' is redundant. Sorry for my poor English.

rdnetto commented 6 years ago

There is a "c++" in the flags.

This isn't a bug - -x specifies the language, and c++ is its value.

Also, if I write "-I../include/" in Makefile, there will be a '-I../include/' in the flags.

This is working as expected - YCM-Gen generates the configuration from the build system / Makefile. If you want to change the flag, just remove the trailing slash from it.