From: Nico Weber Date: Mon, 21 Jan 2013 19:35:06 +0000 (+0000) Subject: Formatter: Set MatchingParen for [], to match <>, (), {}. No functionality change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05bf827fb8c0812e14d287c24e6f0a0b8e64377e;p=clang 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 --- 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; }