Skip to content

Commit b7f0174

Browse files
committed
Address review feedback
1 parent 926abee commit b7f0174

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/AST/CommentParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,11 @@ class TextTokenRetokenizer {
259259
if (Pos.BufferPtr + 1 == Pos.BufferEnd) {
260260
consumeChar();
261261
break;
262-
} else {
263-
consumeChar();
264262
}
263+
consumeChar();
265264
}
266265

267-
const unsigned Length = WordText.size();
266+
unsigned Length = WordText.size();
268267
if (Length == 0) {
269268
Pos = SavedPos;
270269
return false;
@@ -454,6 +453,7 @@ Parser::parseThrowCommandArgs(TextTokenRetokenizer &Retokenizer,
454453
ArrayRef<Comment::Argument>
455454
Parser::parseParCommandArgs(TextTokenRetokenizer &Retokenizer,
456455
unsigned NumArgs) {
456+
assert(NumArgs > 0);
457457
auto *Args = new (Allocator.Allocate<Comment::Argument>(NumArgs))
458458
Comment::Argument[NumArgs];
459459
unsigned ParsedArgs = 0;

0 commit comments

Comments
 (0)