Patch for regression in clang-format.py in r235080

Daniel Jasper djasper at google.com
Fri Apr 17 01:05:37 PDT 2015


Thanks and sorry for not testing more thoroughly. Submitted in r235162.

On Fri, Apr 17, 2015 at 9:52 AM, Schlottke, Michael <
M.Schlottke at aia.rwth-aachen.de> wrote:

> Hi everyone,
>
> in r235080 a “fallback_style” option was introduced to clang-format.py.
> However, now clang-format.py does not work anymore if no fallback style was
> defined in vim:
>
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File
> "/home/mic/.pool/.src/llvm/tools/clang/tools/clang-format/clang-format.py",
> line 89, in <module>
>     main()
>   File
> "/home/mic/.pool/.src/llvm/tools/clang/tools/clang-format/clang-format.py",
> line 63, in main
>     if fallback_style:
> NameError: global name 'fallback_style' is not defined
>
> I’ve included a patch to initialize fallback_style to None for the case
> where g:clang_format_fallback_style is not set in vim.
>
> Michael
>
> P.S.: Please excuse if this should not be the right venue to post this
> bug/patch, this is my first attempt.
>
>
> _______________________________________________
> 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/20150417/182ce38f/attachment.html>


More information about the cfe-commits mailing list