summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authormydeveloperday <mydeveloperday@gmail.com>2020-01-19 15:56:04 +0000
committerHans Wennborg <hans@chromium.org>2020-01-21 18:53:05 +0100
commit587b3b2a13d27c50006607a6b7e7458e6d7cc3fa (patch)
tree9b7a37bb8593e6ebc1ed7955f4499da6722168de /clang/unittests/Format/FormatTest.cpp
parentde4b2a7fad6571d8227df42f73d373574c4b5fe1 (diff)
downloadbcm5719-llvm-587b3b2a13d27c50006607a6b7e7458e6d7cc3fa.tar.gz
bcm5719-llvm-587b3b2a13d27c50006607a6b7e7458e6d7cc3fa.zip
[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 (cherry picked from commit ea2be452542c81b04621e26c0d5e83be565f07e2)
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 2d67b9759d7..c47e2e9a116 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -14927,6 +14927,7 @@ TEST_F(FormatTest, SpacesInConditionalStatement) {
verifyFormat("while ( a )\n return;", Spaces);
verifyFormat("while ( (a && b) )\n return;", Spaces);
verifyFormat("do {\n} while ( 1 != 0 );", Spaces);
+ verifyFormat("try {\n} catch ( const std::exception & ) {\n}", Spaces);
// Check that space on the left of "::" is inserted as expected at beginning
// of condition.
verifyFormat("while ( ::func() )\n return;", Spaces);
OpenPOWER on IntegriCloud