llvm-project/clang/tools/clang-format
Philipp Stephani c256a4ed17 Fix assume-filename handling in clang-format.el
Summary:
When 'buffer-file-name' is nil 'call-process-region' returned a segmentation fault error.

This was a problem when using clang-format-buffer on an orgmode source code editing buffer.

I fixed this problem by excluding the '-assume-filename' argument when 'buffer-file-name' is nil.

To make it a bit more flexible I also added an optional argument, 'assume-file-name', to specify an assume-filename that overrides 'buffer-file-name'.

Reviewers: klimek, djasper, phst, phi

Reviewed By: phst, phi

Subscribers: phi, jholewinski, mgorny, javed.absar, eraman, cfe-commits

Differential Revision: https://reviews.llvm.org/D37903

llvm-svn: 319621
2017-12-02 21:18:14 +00:00
..
fuzzer [cmake] Rename LIB_FUZZING_ENGINE to LLVM_LIB_FUZZING_ENGINE. 2017-10-12 22:00:09 +00:00
CMakeLists.txt [cmake] Rename LIB_FUZZING_ENGINE to LLVM_LIB_FUZZING_ENGINE. 2017-10-12 22:00:09 +00:00
ClangFormat.cpp Fix clang-format CLion integration bug. 2017-11-02 12:48:48 +00:00
clang-format-bbedit.applescript
clang-format-diff.py Add the --no-color option to the git call in the doc when using clang-format-diff 2016-12-03 23:22:45 +00:00
clang-format-sublime.py clang-format: Enable #include sorting by default. 2015-11-16 12:38:56 +00:00
clang-format-test.el Use UTF-8 for all communication with clang-format 2017-01-20 09:37:50 +00:00
clang-format.el Fix assume-filename handling in clang-format.el 2017-12-02 21:18:14 +00:00
clang-format.py [clang-format] Fix lines=all case in clang-format.py 2017-09-05 13:58:53 +00:00
git-clang-format [clang-format] Allow git-clang-format to handle empty extensions. 2017-06-15 00:54:08 +00:00