Switch the default mode for clang-format to '-file'. Make 'LLVM' the
fallback syntax used when we fail to find a '.clang-format' file. Adjust variable names appropriately. Update the editor integration pieces that specify a '-style' option to specify it as '-style=file'. I left the functionality in place because even if the preferred method is to use '.clang-format' files, this way if someone needs to clobber the style in their editor we show how to do so in these examples. Also check in a '.clang-format' file for Clang to ensure that separate checkouts and builds of Clang from LLVM can still get the nice formatting. =] This unfortunately required nuking the test for the absence of a '.clang-format' file as now the directory happening to be under your clang source tree will cause there to always be a file. ;] llvm-svn: 189741
Showing
- clang/.clang-format 1 addition, 0 deletionsclang/.clang-format
- clang/test/Format/style-on-command-line.cpp 2 additions, 5 deletionsclang/test/Format/style-on-command-line.cpp
- clang/tools/clang-format/ClangFormat.cpp 7 additions, 7 deletionsclang/tools/clang-format/ClangFormat.cpp
- clang/tools/clang-format/clang-format-sublime.py 4 additions, 3 deletionsclang/tools/clang-format/clang-format-sublime.py
- clang/tools/clang-format/clang-format.el 1 addition, 1 deletionclang/tools/clang-format/clang-format.el
- clang/tools/clang-format/clang-format.py 4 additions, 3 deletionsclang/tools/clang-format/clang-format.py
Loading
Please register or sign in to comment