Patch for regression in clang-format.py in r235080
Schlottke, Michael
M.Schlottke at aia.rwth-aachen.de
Fri Apr 17 00:52:30 PDT 2015
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_default_fallback.patch
Type: application/octet-stream
Size: 509 bytes
Desc: add_default_fallback.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150417/01013073/attachment.obj>
More information about the cfe-commits
mailing list