diff options
author | Owen Pan <owenpiano@gmail.com> | 2018-09-28 09:17:00 +0000 |
---|---|---|
committer | Owen Pan <owenpiano@gmail.com> | 2018-09-28 09:17:00 +0000 |
commit | 784cbe17cab0ca6cda9a24d094292fd97992019c (patch) | |
tree | 2fc13d5e7d5a84a9a1e5aa5672fe4dfa99ebd0c8 /lib | |
parent | d4b76a11e222e16454df3c18580bdc865de5d8c7 (diff) | |
download | clang-784cbe17cab0ca6cda9a24d094292fd97992019c.tar.gz |
[ClangFormat] 'try' of function-try-block doesn't obey BraceWrapping
It should respond to AfterFunction, not AfterControlStatement.
Fixes PR39067
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 752357c1af..09cd660e6d 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -1266,6 +1266,8 @@ void UnwrappedLineParser::parseStructuralElement() { break; case tok::kw_try: // We arrive here when parsing function-try blocks. + if (Style.BraceWrapping.AfterFunction) + addUnwrappedLine(); parseTryCatch(); return; case tok::identifier: { |