diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-22 00:47:53 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-22 00:47:53 +0000 |
commit | 94442980c08049a7867d0aa2f0bf79cf751083fe (patch) | |
tree | ddb448daed60928e6d9a0fe9e8dc31e68b601383 /clang/lib/Edit/RewriteObjCFoundationAPI.cpp | |
parent | 058bb9908f25566b5ec67f36ebf7f709cb6d9c1f (diff) | |
download | bcm5719-llvm-94442980c08049a7867d0aa2f0bf79cf751083fe.tar.gz bcm5719-llvm-94442980c08049a7867d0aa2f0bf79cf751083fe.zip |
[objcmt] Don't add redundant parentheses when migrating subscripting of an ivar.
rdar://11501256
llvm-svn: 157227
Diffstat (limited to 'clang/lib/Edit/RewriteObjCFoundationAPI.cpp')
-rw-r--r-- | clang/lib/Edit/RewriteObjCFoundationAPI.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp b/clang/lib/Edit/RewriteObjCFoundationAPI.cpp index 846d58fc2cb..7445700cc49 100644 --- a/clang/lib/Edit/RewriteObjCFoundationAPI.cpp +++ b/clang/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) || |