r221108 - clang-format: permit setting the path to clang in vimrc

Hans Wennborg hans at chromium.org
Tue Nov 4 01:50:21 PST 2014


On Sun, Nov 2, 2014 at 10:27 PM, Saleem Abdulrasool
<compnerd at compnerd.org> wrote:
> Author: compnerd
> Date: Sun Nov  2 15:27:59 2014
> New Revision: 221108
>
> URL: http://llvm.org/viewvc/llvm-project?rev=221108&view=rev
> Log:
> clang-format: permit setting the path to clang in vimrc
>
> If g:clang_format_path is set in the vimrc, that path will take precedence over
> the hard coded path (which is reliant on the PATH environment variable).  This
> provides an easy mechanism for switching the selected clang-format binary during
> development.

This breaks the Vim integration for me:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/work/llvm/tools/clang/tools/clang-format/clang-format.py",
line 30, in <module>
    binary = vim.eval('g:clang_format_path')
vim.error: Vim:E121: Undefined variable: g:clang_format_path


(I've worked around this locally by setting g:clang_format_path, but
it might break others too.)



More information about the cfe-commits mailing list