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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302658 91177308-0d34-0410-b5e6-96231b3b80d8
Loading
Please register or sign in to comment