>
> I installed the Cygwin clang packages and the clang_complete Vim
> plugin from Github.
>
> http://www.vim.org/scripts/script.php?script_id=3302
> https://github.com/Rip-Rip/clang_complete
>
> Then a simple test:
>
> #include <iostream>
> int main(void) {
> std:: // <= second colon triggers completion
> }
>
> But alas, no completion; instead, an error; calling :messages reveals:
>
> E486: Muster nicht gefunden: 686
>
> That means "Pattern not found".
>
> The error list for clang_complete contains:
>
> tmp.cpp|| unknown argument: '-mtune=generic'
> tmp.cpp|| unknown argument: '-march=i686'
I got it working! :) And it rocks big time!
The issue was the following:
:help clang_complete-auto_user_options
| An example of custom option sources is bundled with clang_complete and
| called "gcc". This source runs gcc to get a list of include paths. The
| list of include paths for each of supported filetypes (c, cpp, objc
| and objcpp) is cached on a disk and can be removed by calling
| ClearGCCIncludeCaches() function (for changes to take affect one needs
| to reread buffers using the :edit command or something equivalent).
| Default: "path, .clang_complete, gcc"
The "gcc" feature has to be removed because it gets it wrong:
let g:clang_auto_user_options='path, .clang_complete'
The reason is that the "gcc" feature does the following:
echo | cpp -v -x c++
echo | cpp -v -x c
The last line of the cpp output has the unwanted options:
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=i686'
Not sure how exactly that ends up as part of the clang options.
Maybe some parsing bug.
Michael
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment