]> granicus.if.org Git - clang/commit
Config file support for clang-format, part 2.
authorAlexander Kornienko <alexfh@google.com>
Fri, 10 May 2013 11:56:10 +0000 (11:56 +0000)
committerAlexander Kornienko <alexfh@google.com>
Fri, 10 May 2013 11:56:10 +0000 (11:56 +0000)
commitdd256314cf391063329e504f0ece46ee51bbfa2a
tree54d11f2326b3c476466868b05738a2c6ff185b8a
parentacf02715ab1aa1e5a791f20e0d1ca217af256823
Config file support for clang-format, part 2.

Summary:
Adds actual config file reading to the clang-format utility.
Configuration file name is .clang-format. It is looked up for each input file
in its parent directories starting from immediate one. First found .clang-format
file is used. When using standard input, .clang-format is searched starting from
the current directory.
Added -dump-config option to easily create configuration files.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits, jordan_rose, kimgr
Differential Revision: http://llvm-reviews.chandlerc.com/D758

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181589 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Format/Format.h
lib/Format/Format.cpp
tools/clang-format/ClangFormat.cpp
unittests/Format/FormatTest.cpp