Skip to content

Commit

Permalink
preprocessor.cpp: set Suppression::isInline earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Jan 14, 2025
1 parent 36a4a9f commit 8e625a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/preprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ static bool parseInlineSuppressionCommentToken(const simplecpp::Token *tok, std:
std::vector<SuppressionList::Suppression> suppressions = SuppressionList::parseMultiSuppressComment(comment, &errmsg);

for (SuppressionList::Suppression &s : suppressions) {
s.isInline = true;
s.type = errorType;
s.lineNumber = tok->location.line;
}
Expand All @@ -152,6 +153,7 @@ static bool parseInlineSuppressionCommentToken(const simplecpp::Token *tok, std:
if (!s.parseComment(comment, &errmsg))
return false;

s.isInline = true;
s.type = errorType;
s.lineNumber = tok->location.line;

Expand Down Expand Up @@ -232,7 +234,6 @@ static void addInlineSuppressions(const simplecpp::TokenList &tokens, const Sett
// Add the suppressions.
for (SuppressionList::Suppression &suppr : inlineSuppressions) {
suppr.fileName = relativeFilename;
suppr.isInline = true; // TODO: set earlier

if (SuppressionList::Type::blockBegin == suppr.type)
{
Expand Down

0 comments on commit 8e625a6

Please sign in to comment.