aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-21 19:35:06 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-21 19:35:06 +0000
commit05bf827fb8c0812e14d287c24e6f0a0b8e64377e (patch)
treedf63919367883eef32b934751a61be72fdcd0810
parent3f29fbb9d86dc58730bbfcdd26dc6ee6a401cbd4 (diff)
Formatter: Set MatchingParen for [], to match <>, (), {}. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173078 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index b94925a2ab..6fb1bc2cb7 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -953,6 +953,8 @@ public:
if (CurrentToken->is(tok::r_square)) {
if (StartsObjCMethodExpr)
objCSelector.markEnd(*CurrentToken);
+ Left->MatchingParen = CurrentToken;
+ CurrentToken->MatchingParen = Left;
next();
return true;
}