Skip to content

Commit b2809b4

Browse files
committed
[Coverity] Fix unchecked return value, NFC
1 parent 6e19eea commit b2809b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/include/llvm/MC/MCParser/AsmLexer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class AsmLexer : public MCAsmLexer {
5555
private:
5656
bool isAtStartOfComment(const char *Ptr);
5757
bool isAtStatementSeparator(const char *Ptr);
58-
int getNextChar();
58+
[[nodiscard]] int getNextChar();
5959
int peekNextChar();
6060
AsmToken ReturnError(const char *Loc, const std::string &Msg);
6161

llvm/lib/MC/MCParser/AsmLexer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ AsmToken AsmLexer::LexSingleQuote() {
578578
} else if (peekNextChar() == '\'') {
579579
// In MASM single-quote strings, doubled single-quotes mean an escaped
580580
// single quote, so should be lexed in.
581-
getNextChar();
581+
(void)getNextChar();
582582
CurChar = getNextChar();
583583
} else {
584584
break;
@@ -635,7 +635,7 @@ AsmToken AsmLexer::LexQuote() {
635635
} else if (peekNextChar() == '"') {
636636
// In MASM double-quoted strings, doubled double-quotes mean an escaped
637637
// double quote, so should be lexed in.
638-
getNextChar();
638+
(void)getNextChar();
639639
CurChar = getNextChar();
640640
} else {
641641
break;

0 commit comments

Comments
 (0)