clang/test/Format
Ben Hamilton e88bf5d2a8 [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323668 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-29 17:36:43 +00:00
..
adjust-indent.cpp clang-format: When a line is formatted, also format subsequence lines if their indent is off. 2015-10-28 01:08:22 +00:00
basic.cpp clang-format: Use pipes instead of temporary files for most lit tests. 2015-10-19 16:21:29 +00:00
cursor.cpp Fix clang-format test. I believe that the new behavior is better. 2015-11-23 08:50:52 +00:00
disable-format.cpp clang-format: Use pipes instead of temporary files for most lit tests. 2015-10-19 16:21:29 +00:00
disable-include-sorting.cpp clang-format: Enable #include sorting by default. 2015-11-16 12:38:56 +00:00
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 [clang-format] Replace IncompleteFormat by a struct with Line 2017-04-21 14:35:20 +00:00
inplace.cpp clang/test/Format/inplace.cpp: Avoid using wildcard. 2017-02-28 10:05:56 +00:00
language-detection.cpp clang-format: Use pipes instead of temporary files for most lit tests. 2015-10-19 16:21:29 +00:00
line-ranges.cpp clang-format: When a line is formatted, also format subsequence lines if their indent is off. 2015-10-28 01:08:22 +00:00
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 Added -lines X:Y option to specify line range to process. This is a more human-friendly alternative to -offset and -length. 2013-07-18 22:54:56 +00:00
multiple-inputs-inplace.cpp clang-format support for multiple input files. 2013-04-24 12:46:44 +00:00
multiple-inputs.cpp clang-format support for multiple input files. 2013-04-24 12:46:44 +00:00
ranges.cpp clang-format: When a line is formatted, also format subsequence lines if their indent is off. 2015-10-28 01:08:22 +00:00
remove-duplicate-includes.cpp Make clang-format remove duplicate headers when sorting #includes. 2016-08-10 09:32:23 +00:00
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 clang-format: Use pipes instead of temporary files for most lit tests. 2015-10-19 16:21:29 +00:00