[llvm-branch-commits] [cfe-branch] r181380 - Merging r181299:
Bill Wendling
isanbard at gmail.com
Tue May 7 17:29:53 PDT 2013
Author: void
Date: Tue May 7 19:29:53 2013
New Revision: 181380
URL: http://llvm.org/viewvc/llvm-project?rev=181380&view=rev
Log:
Merging r181299:
------------------------------------------------------------------------
r181299 | djasper | 2013-05-07 02:25:29 -0700 (Tue, 07 May 2013) | 5 lines
Fix clang-format emacs integration in last line.
Emacs seems to have a line that is just past the last character of the
buffers content. This needs to be handled specially so that clang-format
is not called with an invalid -offset.
------------------------------------------------------------------------
Modified:
cfe/branches/release_33/ (props changed)
cfe/branches/release_33/tools/clang-format/clang-format.el
Propchange: cfe/branches/release_33/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 7 19:29:53 2013
@@ -1,3 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
+/cfe/trunk:181299
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_33/tools/clang-format/clang-format.el
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_33/tools/clang-format/clang-format.el?rev=181380&r1=181379&r2=181380&view=diff
==============================================================================
--- cfe/branches/release_33/tools/clang-format/clang-format.el (original)
+++ cfe/branches/release_33/tools/clang-format/clang-format.el Tue May 7 19:29:53 2013
@@ -19,8 +19,8 @@
(if mark-active
(setq beg (region-beginning)
end (region-end))
- (setq beg (line-beginning-position)
- end (line-end-position)))
+ (setq beg (min (line-beginning-position) (1- (point-max)))
+ end (min (line-end-position) (1- (point-max)))))
(call-process-region (point-min) (point-max) binary t t nil
"-offset" (number-to-string (1- beg))
"-length" (number-to-string (- end beg))
More information about the llvm-branch-commits
mailing list