[SSAF] Fix -Wunused-variable (#193344)
We currently take the return value of inserting into a map (the iterator and insertion boolean) to assert on the value of the insertion boolean. This is unused in non-asserts builds, so mark it [[maybe_unused]] given we cannot inline due to the insertion having side effects.
This commit is contained in:
@@ -114,8 +114,9 @@ void clang::ssaf::UnsafeBufferUsageTUSummaryExtractor::HandleTranslationUnit(
|
||||
if (!ContributorName)
|
||||
llvm::reportFatalInternalError(makeEntityNameErr(Ctx, CD));
|
||||
|
||||
auto [Ignored, InsertionSucceeded] = SummaryBuilder.addSummary(
|
||||
SummaryBuilder.addEntity(*ContributorName), std::move(*EntitySummary));
|
||||
[[maybe_unused]] auto [Ignored, InsertionSucceeded] =
|
||||
SummaryBuilder.addSummary(SummaryBuilder.addEntity(*ContributorName),
|
||||
std::move(*EntitySummary));
|
||||
|
||||
assert(InsertionSucceeded && "duplicated contributor extraction");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user