From 8e625a66f821c827c2b436e1cd8a03da95cfdf72 Mon Sep 17 00:00:00 2001 From: firewave Date: Tue, 14 Jan 2025 13:05:35 +0100 Subject: [PATCH] preprocessor.cpp: set `Suppression::isInline` earlier --- lib/preprocessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 45573321995..5e086d0088b 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -135,6 +135,7 @@ static bool parseInlineSuppressionCommentToken(const simplecpp::Token *tok, std: std::vector suppressions = SuppressionList::parseMultiSuppressComment(comment, &errmsg); for (SuppressionList::Suppression &s : suppressions) { + s.isInline = true; s.type = errorType; s.lineNumber = tok->location.line; } @@ -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; @@ -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) {