summaryrefslogtreecommitdiffstats
path: root/clang/lib
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/lib
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/lib')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index d5d394e6192..88564e02f23 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -2596,7 +2596,7 @@ bool TokenAnnotator::spaceRequiredBeforeParens(const FormatToken &Right) const {
/// otherwise.
static bool isKeywordWithCondition(const FormatToken &Tok) {
return Tok.isOneOf(tok::kw_if, tok::kw_for, tok::kw_while, tok::kw_switch,
- tok::kw_constexpr);
+ tok::kw_constexpr, tok::kw_catch);
}
bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
OpenPOWER on IntegriCloud