Changes

Summary

  1. Allow space after C-style cast in C# code (details)
  2. [clang-format] Add IndentCaseBlocks option (details)
  3. [clang-format] Expand the SpacesAroundConditions option to include catch (details)
  4. Remove extra "\01" prefix in EH docs (details)
  5. Fix gcc `-Wunused-variable` warning. NFC. (details)
Commit d82adf328fb556e1e6d318608b683824c8badf22 by paulhoad
Allow space after C-style cast in C# code
Reviewed By: MyDeveloperDay, krasimir
Patch By: jbcoe
Differential Revision: https://reviews.llvm.org/D72150
The file was modifiedclang/unittests/Format/FormatTestCSharp.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
Commit 14c044756e771eb9160d5809b4381bdeb0fc210c by paulhoad
[clang-format] Add IndentCaseBlocks option
Summary: The documentation for IndentCaseLabels claimed that the "Switch
statement body is always indented one level more than case labels". This
is technically false for the code block immediately following the label.
Its closing bracket aligns with the start of the label.
If the case label are not indented, it leads to a style where the
closing bracket of the block aligns with the closing bracket of the
switch statement, which can be hard to parse.
This change introduces a new option, IndentCaseBlocks, which when true
treats the block as a scope block (which it technically is).
(Note: regenerated ClangFormatStyleOptions.rst using
tools/dump_style.py)
Reviewed By: MyDeveloperDay
Patch By: capn
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D72276
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/include/clang/Format/Format.h
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
Commit ea2be452542c81b04621e26c0d5e83be565f07e2 by paulhoad
[clang-format] Expand the SpacesAroundConditions option to include catch
statements
Summary: This diff expands the SpacesAroundConditions option added in
D68346 to include adding spaces to catch statements.
Reviewed By: MyDeveloperDay
Patch by: timwoj
Differential Revision: https://reviews.llvm.org/D72793
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
Commit badc7e6cf9fe9c9d5941899a929f36e5dc083770 by rnk
Remove extra "\01" prefix in EH docs
These escapes haven't been necessary since f8b51c5f90c60. Remove them to
declutter the docs.
The file was modifiedllvm/docs/ExceptionHandling.rst
Commit 70b53a301888fe2be36996b41a7dd5aa7c256dc9 by michael.hliao
Fix gcc `-Wunused-variable` warning. NFC.
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp