llvm.org GIT mirror llvm / 47b5939
[emacs] Indent statement continuation to match clang-format Summary: Was: int LongVariableName = veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter); int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter) .nowThisDoesntFit() .andThis() Now: int LongVariableName = veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter); int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter) .nowThisDoesntFit() .andThis() Reviewers: espindola, MaskRay Reviewed By: MaskRay Subscribers: greened, llvm-commits Differential Revision: https://reviews.llvm.org/D49726 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338686 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Savonichev 2 years ago
1 changed file(s) with 11 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
0 ;; LLVM coding style guidelines in emacs
11 ;; Maintainer: LLVM Team, http://llvm.org/
2
3 (defun llvm-lineup-statement (langelem)
4 (let ((in-assign (c-lineup-assignments langelem)))
5 (if (not in-assign)
6 '++
7 (aset in-assign 0
8 (+ (aref in-assign 0)
9 (* 2 c-basic-offset)))
10 in-assign)))
211
312 ;; Add a cc-mode style for editing LLVM C and C++ code
413 (c-add-style "llvm.org"
918 (indent-tabs-mode . nil)
1019 (c-offsets-alist . ((arglist-intro . ++)
1120 (innamespace . 0)
12 (member-init-intro . ++)))))
21 (member-init-intro . ++)
22 (statement-cont . llvm-lineup-statement)))))
1323
1424 ;; Files with "llvm" in their names will automatically be set to the
1525 ;; llvm.org coding style.