hanchenye-llvm-project/clang/test/Format
Ben Hamilton 6845dec917 [clang-format] Fix bug where -dump-config failed on ObjC header
Summary:
`clang-format -dump-config path/to/file.h` never passed
anything for the Code parameter to clang::format::getStyle().

This meant the logic to guess Objective-C from the contents
of a .h file never worked, because LibFormat didn't have the
code to work with.

With this fix, we now correctly read in the contents of the
file if possible with -dump-config.

I had to update the lit config for test/Format/ because
the default config ignores .h files.

Test Plan: make -j12 check-clang

Reviewers: jolesiak, krasimir

Reviewed By: jolesiak, krasimir

Subscribers: Wizard, klimek, cfe-commits, djasper

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

llvm-svn: 323668
2018-01-29 17:36:43 +00:00
..
adjust-indent.cpp
basic.cpp
cursor.cpp
disable-format.cpp
disable-include-sorting.cpp
dump-config-cxx.h [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
dump-config-objc.h [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
incomplete.cpp
inplace.cpp
language-detection.cpp
line-ranges.cpp
lit.local.cfg [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
multiple-inputs-error.cpp
multiple-inputs-inplace.cpp
multiple-inputs.cpp
ranges.cpp
remove-duplicate-includes.cpp
style-on-command-line.cpp [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
verbose.cpp clang-format: add an option -verbose to list the files being processed 2017-08-12 15:15:10 +00:00
xmloutput.cpp