summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2015-01-23 21:58:46 +0000
committerFariborz Jahanian <fjahanian@apple.com>2015-01-23 21:58:46 +0000
commitf9317f15861fbcce774e9ccec71d8aefb3a03e56 (patch)
tree2054edb3c01424cd1d2bd02f08d0c10af3f25387 /clang/lib
parente368a62676670b66680f7dd02b171d95bc3281e1 (diff)
downloadbcm5719-llvm-f9317f15861fbcce774e9ccec71d8aefb3a03e56.tar.gz
bcm5719-llvm-f9317f15861fbcce774e9ccec71d8aefb3a03e56.zip
Objective-C moderinzer [qoi], add space on rhs when needed when
converting to property-dot syntax for setters. rdar://19381786 llvm-svn: 226944
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/ARCMigrate/ObjCMT.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp
index 48a4931c207..59feea11e13 100644
--- a/clang/lib/ARCMigrate/ObjCMT.cpp
+++ b/clang/lib/ARCMigrate/ObjCMT.cpp
@@ -309,6 +309,10 @@ namespace {
BegLoc = PP.getLocForEndOfToken(BegLoc);
SourceLocation EndLoc = RHS->getLocStart();
EndLoc = EndLoc.getLocWithOffset(-1);
+ const char *colon = PP.getSourceManager().getCharacterData(EndLoc);
+ // Add a space after '=' if there is no space between RHS and '='
+ if (colon && colon[0] == ':')
+ PropertyDotString += " ";
SourceRange Range(BegLoc, EndLoc);
commit.replace(Range, PropertyDotString);
// remove '[' ']'
OpenPOWER on IntegriCloud