justmao945 / vim-clang

Clang completion plugin for vim
ISC License
358 stars 47 forks source link

can't work with -DTEST()="hello" #110

Open johnzeng opened 7 years ago

johnzeng commented 7 years ago

set up a .clang file with the following content:

-D TEST(A)="hello"

and then you will get error because you didn't escape () in the command....

bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `clang -fsyntax-only -Xclang -code-completion-macros -Xclang -code-completion-at=-:12:7  -D TEST(A)=B -x c++  -I '/Users/johnzeng/learning/cpp' -I '/usr/include' -'
justmao945 commented 7 years ago

-D 'TEST(A)="hello"'

johnzeng commented 7 years ago

I don't think this is a good enough solution for a plugin... but ... this plugin is just passing parameters to a shell so I think there is no such thing called 'perfect solution' so I give up. Do you mind to update the readme file to let other people knows this inconvenient?