[clang-format]: Add NonEmptyParentheses spacing option
authorReuben Thomas <reuben.thomas@me.com>
Sat, 30 Mar 2019 12:32:35 +0000 (12:32 +0000)
committerReuben Thomas <reuben.thomas@me.com>
Sat, 30 Mar 2019 12:32:35 +0000 (12:32 +0000)
commit08a940d629fa218670caaa949095bc5026f019b3
tree5f6f2644cc3aaebdad6d6c92daa967f247b482ec
parentc4ac74fb4987c083fa8e7e10f0f978ecee9402c0
[clang-format]: Add NonEmptyParentheses spacing option

This patch aims to add support for the following rules from the JUCE coding standards:

- Always put a space before an open parenthesis that contains text - e.g. foo (123);
- Never put a space before an empty pair of open/close parenthesis - e.g. foo();

Patch by Reuben Thomas

Differential Revision: https://reviews.llvm.org/D55170

llvm-svn: 357344
clang/include/clang/Format/Format.h
clang/lib/Format/Format.cpp
clang/lib/Format/TokenAnnotator.cpp
clang/lib/Format/TokenAnnotator.h
clang/unittests/Format/FormatTest.cpp