Skip to content

Commit 8a69fa4

Browse files
Use the EndLoc variable like I meant to.
A fixup to "Get the correct form...".
1 parent d19041e commit 8a69fa4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/3C/DeclRewriter.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,8 @@ void DeclRewriter::rewriteMultiDecl(DeclReplacement *N, RSet &ToRewrite,
435435
SourceLocation EndLoc = DD->DeclaratorDecl::getSourceRange().getEnd();
436436

437437
// Do the replacement. PrevEnd is setup to be the source location of the
438-
// comma after the previous declaration in the multi-decl. getEndLoc is
439-
// either the end of the declaration or just before the initializer if
440-
// one is present.
441-
SourceRange SR(PrevEnd, DD->DeclaratorDecl::getSourceRange().getEnd());
438+
// comma after the previous declaration in the multi-decl.
439+
SourceRange SR(PrevEnd, EndLoc);
442440
rewriteSourceRange(R, SR, NewDeclStr);
443441
}
444442
}

0 commit comments

Comments
 (0)