summaryrefslogtreecommitdiffstats
path: root/lib/Format
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2017-07-17 15:27:53 +0000
committerManuel Klimek <klimek@google.com>2017-07-17 15:27:53 +0000
commit9359793849d473e257cc7b050e2dbe65072c15ac (patch)
tree7745d8e9c2aa5d8611eae86d2a95487bb02549f9 /lib/Format
parente145b58944660392991fb9dc7993938d5a33e206 (diff)
Fix dereference of pointers in throw statements.
Before: throw * x; After: throw *x; Patch by Erik Uhlmann. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format')
-rw-r--r--lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index c6e90a9175..46ea06b880 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -1383,7 +1383,8 @@ private:
if (PrevToken->isOneOf(tok::l_paren, tok::l_square, tok::l_brace,
tok::comma, tok::semi, tok::kw_return, tok::colon,
- tok::equal, tok::kw_delete, tok::kw_sizeof) ||
+ tok::equal, tok::kw_delete, tok::kw_sizeof,
+ tok::kw_throw) ||
PrevToken->isOneOf(TT_BinaryOperator, TT_ConditionalExpr,
TT_UnaryOperator, TT_CastRParen))
return TT_UnaryOperator;