aboutsummaryrefslogtreecommitdiff
path: root/lib/Edit/RewriteObjCFoundationAPI.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-22 00:47:53 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-05-22 00:47:53 +0000
commit2bddd43bd87efedc308094e80af3917ef2c9a0d4 (patch)
treeaffa59b764131c52b58865aba7b09dc8d1187f97 /lib/Edit/RewriteObjCFoundationAPI.cpp
parent3a4653039524e1518243ae8e77ca10534e50e378 (diff)
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
rdar://11501256 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r--lib/Edit/RewriteObjCFoundationAPI.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp
index 846d58fc2c..7445700cc4 100644
--- a/lib/Edit/RewriteObjCFoundationAPI.cpp
+++ b/lib/Edit/RewriteObjCFoundationAPI.cpp
@@ -624,6 +624,7 @@ static bool subscriptOperatorNeedsParens(const Expr *FullExpr) {
isa<ObjCPropertyRefExpr>(Expr) ||
isa<ObjCProtocolExpr>(Expr) ||
isa<MemberExpr>(Expr) ||
+ isa<ObjCIvarRefExpr>(Expr) ||
isa<ParenExpr>(FullExpr) ||
isa<ParenListExpr>(Expr) ||
isa<SizeOfPackExpr>(Expr))
@@ -650,6 +651,7 @@ static bool castOperatorNeedsParens(const Expr *FullExpr) {
isa<ObjCPropertyRefExpr>(Expr) ||
isa<ObjCProtocolExpr>(Expr) ||
isa<MemberExpr>(Expr) ||
+ isa<ObjCIvarRefExpr>(Expr) ||
isa<ParenExpr>(FullExpr) ||
isa<ParenListExpr>(Expr) ||
isa<SizeOfPackExpr>(Expr) ||