Skip to content

Commit 9da76c0

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

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

423423
// Do the replacement. PrevEnd is setup to be the source location of the
424-
// comma after the previous declaration in the multi-decl. getEndLoc is
425-
// either the end of the declaration or just before the initializer if
426-
// one is present.
427-
SourceRange SR(PrevEnd, DD->DeclaratorDecl::getSourceRange().getEnd());
424+
// comma after the previous declaration in the multi-decl.
425+
SourceRange SR(PrevEnd, EndLoc);
428426
rewriteSourceRange(R, SR, NewDeclStr);
429427
}
430428
}

0 commit comments

Comments
 (0)