]> granicus.if.org Git - clang/commit
clang-format: Add -assume-filename option for editor integrations.
authorDaniel Jasper <djasper@google.com>
Fri, 13 Sep 2013 13:40:24 +0000 (13:40 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 13 Sep 2013 13:40:24 +0000 (13:40 +0000)
commit62df7ef28c5a1ed3f5ffd1036162cafe0e1fcd4c
tree7530a9d9f6862d423d52eb0d9d8c4397d6766642
parentcb2dfc7247a66e672548ad645a0ba2c369635384
clang-format: Add -assume-filename option for editor integrations.

With -style=file, clang-format now starts to search for a .clang-format
file starting at the file given with -assume-filename if it reads from
stdin. Otherwise, it would start searching from the current directory,
which is not helpful for editor integrations.

Also changed vim, emacs and sublime integrations to actually make use of
this flag.

This fixes llvm.org/PR17072.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190691 91177308-0d34-0410-b5e6-96231b3b80d8
tools/clang-format/ClangFormat.cpp
tools/clang-format/clang-format-sublime.py
tools/clang-format/clang-format.el
tools/clang-format/clang-format.py