Use clang-tidy's readability-simplify-boolean-expr checker.
After applying the fix-its, revise all changes *very* carefully.
Be aware of false positives and invalid changes.
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Sort include directives within each block (separated by a blank line) in
lexicographic order (except to prioritize `sys/types.h` first). First
run `clang-format` with the config file:
---
SortIncludes: false
...
Commit the result temporarily. Then run `clang-format` again with:
---
SortIncludes: true
IncludeCategories:
- Regex: 'sys/types.h'
Priority: -1
...
Commit the result temporarily. Start a new branch and cherry-pick the
second commit. Manually resolve conflicts to preserve indentation of
re-ordered includes. This cleans up the include ordering without
changing any other style.
Use the following command to run `clang-format`:
$ git ls-files -z -- \
'*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
egrep -z -v '(Lexer|Parser|ParserHelper)\.' |
egrep -z -v '^Source/cm_sha2' |
egrep -z -v '^Source/(kwsys|CursesDialog/form)/' |
egrep -z -v '^Utilities/(KW|cm).*/' |
egrep -z -v '^Tests/Module/GenerateExportHeader' |
egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |
xargs -0 clang-format -i
This selects source files that do not come from a third-party.
Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
'curcol' is an implementation detail of ncurses so other implementations
of 'form' may not have it. The switch-to-previous-field logic only
exists for overloaded requests of REQ_DEL_PREV, so no need to check for
REQ_DEL_CHAR. For REQ_DEL_PREV, check if the field changed and if it
did, change it back.
There is no need to duplicate these in all cmLocalGenerators.
Rename the symbols according to current conventions.
Add explicit calls to Set{Source,Binary}Directory with empty strings
in order to trigger the population of the components containers with
the current working directory in cmLocalGenerator. Having
directories set to empty is a special case in CMake, which is relied
on for the `if(CMAKE_BINARY_DIR)` condition at the end of
CMakeDetermineSystem.cmake.
This topic was never tested without some follow-up commits. The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
Revert the changes made by commit v3.1.0-rc1~406^2~1 (Encoding: Add
setlocale() to applications, 2014-05-30) and commit v3.1.0-rc1~406^2
(Encoding: Change to only set LC_CTYPE, 2014-06-11), and other setlocale
calls added later in their spirit. CMake has not been taught how to
deal with non-C locales everywhere. We do not define any functionality
for character conversions for non-ASCII strings. Another solution will
be needed to address the original problem motivating addition of
setlocale() calls.
Instead printing complete help cmake/ccmake now prints only Usage section and
extra information how to get more help or start your build.
Implementation Details:
Usage help type was renamed to Help, and new Usage was introduces that prints
only command line usage information without any extra details.
Commands add some extra information when no arguments are passed.
Changing all categories with LC_ALL causes test failures in some locales.
For example, in some locales, the decimal characer could be a comma instead of period.