Skip to content

Commit 20b23b8

Browse files
Use the EndLoc variable like I meant to.
A fixup to "Get the correct form...".
1 parent fb819ef commit 20b23b8

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
@@ -418,10 +418,8 @@ void DeclRewriter::rewriteMultiDecl(DeclReplacement *N, RSet &ToRewrite,
418418
SourceLocation EndLoc = DD->DeclaratorDecl::getSourceRange().getEnd();
419419

420420
// Do the replacement. PrevEnd is setup to be the source location of the
421-
// comma after the previous declaration in the multi-decl. getEndLoc is
422-
// either the end of the declaration or just before the initializer if
423-
// one is present.
424-
SourceRange SR(PrevEnd, DD->DeclaratorDecl::getSourceRange().getEnd());
421+
// comma after the previous declaration in the multi-decl.
422+
SourceRange SR(PrevEnd, EndLoc);
425423
rewriteSourceRange(R, SR, NewDeclStr);
426424
}
427425
}

0 commit comments

Comments
 (0)