[SourceKit][CodeFormat] When indenting a getter without the leading keyword, first check if the getter is implicit. rdar://24348021

This commit is contained in:
Xi Ge
2016-02-01 11:56:36 -08:00
parent c0bd16e9cd
commit e92fb8109f
2 changed files with 14 additions and 1 deletions

View File

@@ -1642,7 +1642,8 @@ public:
// }
if (auto VD = dyn_cast_or_null<VarDecl>(Cursor->getAsDecl())) {
if (auto Getter = VD->getGetter()) {
if (Getter->getAccessorKeywordLoc().isInvalid()) {
if (!Getter->isImplicit() &&
Getter->getAccessorKeywordLoc().isInvalid()) {
LineAndColumn = ParentLineAndColumn;
continue;
}