[cfe-commits] r173078 - /cfe/trunk/lib/Format/Format.cpp
Nico Weber
nicolasweber at gmx.de
Mon Jan 21 11:35:06 PST 2013
Author: nico
Date: Mon Jan 21 13:35:06 2013
New Revision: 173078
URL: http://llvm.org/viewvc/llvm-project?rev=173078&view=rev
Log:
Formatter: Set MatchingParen for [], to match <>, (), {}. No functionality change.
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=173078&r1=173077&r2=173078&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Mon Jan 21 13:35:06 2013
@@ -953,6 +953,8 @@
if (CurrentToken->is(tok::r_square)) {
if (StartsObjCMethodExpr)
objCSelector.markEnd(*CurrentToken);
+ Left->MatchingParen = CurrentToken;
+ CurrentToken->MatchingParen = Left;
next();
return true;
}
More information about the cfe-commits
mailing list