llvm-project/clang/tools
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
..
arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-arcmt-test [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
c-index-test c-index-test: small fix to CXString handling and disposal 2018-01-18 20:21:07 +00:00
clang-check [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-diff [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-format [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
clang-format-vs clang-format plugin: Add missing NL (new line) at EOF (end of file) 2017-09-22 21:47:39 +00:00
clang-func-mapping [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
clang-fuzzer [CMake] Use PRIVATE in target_link_libraries for fuzzers. 2017-12-06 19:52:40 +00:00
clang-import-test Fix typos of occurred and occurrence 2018-01-24 10:26:09 +00:00
clang-offload-bundler [NFC] fix trivial typos in comments 2018-01-29 05:15:18 +00:00
clang-refactor [cmake] Delete redundant install command for clang-refactor. 2018-01-10 01:00:28 +00:00
clang-rename [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
diag-build
diagtool [CMake] Use PRIVATE in target_link_libraries for executables 2017-12-05 21:49:56 +00:00
driver [Driver] Suggest valid integrated tools 2018-01-15 21:05:40 +00:00
libclang [libclang] Add PrintingPolicy for pretty printing declarations 2018-01-16 10:19:56 +00:00
scan-build [scan-build] Add an option to skip overriding CC and CXX make vars 2018-01-29 16:49:34 +00:00
scan-build-py Fix typos of occurred and occurrence 2018-01-24 10:26:09 +00:00
scan-view Add coding and shebang. 2017-03-02 18:47:22 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00