llvm-project/clang/tools/clang-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
..
fuzzer [CMake] Use PRIVATE in target_link_libraries for fuzzers. 2017-12-06 19:52:40 +00:00
CMakeLists.txt [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
ClangFormat.cpp [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +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 [git-clang-format] Process CUDA files 2018-01-28 10:11:25 +00:00