[clang-format] Add new option to add spaces around conditions
authorMitchell Balan <mitchell@stellarscience.com>
Tue, 3 Dec 2019 17:20:30 +0000 (12:20 -0500)
committerMitchell Balan <mitchell@stellarscience.com>
Tue, 3 Dec 2019 17:20:54 +0000 (12:20 -0500)
commit26748a321e20a7aa952ce8daa4f030c384ae7032
tree54cc57bf9bebc5456b210536e98424b490b0284d
parent9a20c79ddc2523fb68be4d4246d7835c761c382f
[clang-format] Add new option to add spaces around conditions
Summary:
This diff adds a new option SpacesAroundConditions that inserts spaces inside the braces for conditional statements.

Reviewers: klimek, owenpan, mitchell-stellar, MyDeveloperDay

Patch by: timwoj

Subscribers: rsmmr, cfe-commits

Tags: clang, clang-format

Differential Revision: https://reviews.llvm.org/D68346
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTest.cpp