[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

Reuben Thomas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 1 15:26:36 PST 2018


reuk created this revision.
reuk added reviewers: Typz, krasimir, cfe-commits.

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();

The entire set of JUCE coding guidelines can be found here <https://juce.com/discover/stories/coding-standards>. Unfortunately, clang-format can't enforce all of these style rules at the moment, so I'm trying to add support for them.

Patch by Reuben Thomas


Repository:
  rC Clang

https://reviews.llvm.org/D55170

Files:
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  lib/Format/TokenAnnotator.cpp
  unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55170.176272.patch
Type: text/x-patch
Size: 10334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181201/cfc16444/attachment.bin>


More information about the cfe-commits mailing list