Skip to content
Commit b7fb267e authored by Martin Probst's avatar Martin Probst
Browse files

clang-format: refine calculating brace types.

Summary:
For C++ code, opening parenthesis following a } indicate a braced init. For JavaScript and other languages, this is an invalid syntactical construct, unless the closing parenthesis belongs to a function - in which situation its a BK_Block.

This fixes indenting IIFEs following top level functions:

    function foo() {}
    (function() { codeHere(); }());

clang-format used to collapse these lines together.

Subscribers: klimek

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

llvm-svn: 302658
parent d399607f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment