On Arch Linux I had to install clang to make this work: sudo pacman -Syu clang
There's some really nice autoformatting plugins from Google. Add these to your init.vim and install:
" Code formatting (for c++)
Plug 'google/vim-maktaba'
Plug 'google/vim-codefmt'