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

Daniel Jasper djasper at google.com
Tue Nov 4 02:51:55 PST 2014


Fixed in r221254.

Saleem, please test such things thoroughly.

On Tue, Nov 4, 2014 at 11:11 AM, Hans Wennborg <hans at chromium.org> wrote:

> On Tue, Nov 4, 2014 at 11:07 AM, Daniel Jasper <djasper at google.com> wrote:
> > Doesn't the line immediately before that check whether the variable
> exists?
>
> It's supposed to, but it seems that doesn't work. I would be surprised
> if this only happens on my machine. My .vimrc looks like this:
>
> set expandtab
> set ts=2
> set sw=2
> set cindent
> syntax on
>
> map <C-K> :pyf
> /work/llvm/tools/clang/tools/clang-format/clang-format.py<CR>
> imap <C-K> <ESC>:pyf
> /work/llvm/tools/clang/tools/clang-format/clang-format.py<CR>i
>
>
> > On Tue, Nov 4, 2014 at 11:02 AM, Manuel Klimek <klimek at google.com>
> wrote:
> >>
> >> +djasper
> >>
> >>
> >> On Tue Nov 04 2014 at 10:53:30 AM Hans Wennborg <hans at chromium.org>
> wrote:
> >>>
> >>> 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.)
> >>> _______________________________________________
> >>> cfe-commits mailing list
> >>> cfe-commits at cs.uiuc.edu
> >>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141104/ffc2ed88/attachment.html>


More information about the cfe-commits mailing list