1 ;; LLVM coding style guidelines in emacs
2 ;; Maintainer: LLVM Team, http://llvm.org/
4 (defun llvm-lineup-statement (langelem)
5 (let ((in-assign (c-lineup-assignments langelem
)))
10 (* 2 c-basic-offset
)))
13 ;; Add a cc-mode style for editing LLVM C and C++ code
14 (c-add-style "llvm.org"
17 (c++-indent-level .
2)
19 (indent-tabs-mode . nil
)
20 (c-offsets-alist .
((arglist-intro .
++)
22 (member-init-intro .
++)
23 (statement-cont . llvm-lineup-statement
)))))
25 ;; Files with "llvm" in their names will automatically be set to the
26 ;; llvm.org coding style.
27 (add-hook 'c-mode-common-hook
30 (if (string-match "llvm" buffer-file-name
)
32 (c-set-style "llvm.org"))))))