summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit767c8d3570b0a7a0d3f3ec1032f3ec2137e5defc (patch)
tree83656ba4b10514486c83b1570cbff6c10fcf84f9 /clang/lib
parented272de0f244b02fd587ca11a8295f19cc2b4660 (diff)
downloadbcm5719-llvm-767c8d3570b0a7a0d3f3ec1032f3ec2137e5defc.tar.gz
bcm5719-llvm-767c8d3570b0a7a0d3f3ec1032f3ec2137e5defc.zip
Formatter: Set MatchingParen for [], to match <>, (), {}. No functionality change.
llvm-svn: 173078
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index b94925a2ab6..6fb1bc2cb75 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud