From e798e72252249902523e48e5d61625eda590d5d3 Mon Sep 17 00:00:00 2001 From: chrchr-github Date: Mon, 5 Jun 2023 00:10:36 +0200 Subject: [PATCH] Handle combined action/yield --- lib/library.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/library.cpp b/lib/library.cpp index 2f7c6e0dc..917a989cb 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -1360,11 +1360,9 @@ Library::UseRetValType Library::getUseRetValType(const Token *ftok) const { if (Token::simpleMatch(ftok->astParent(), ".")) { using Yield = Library::Container::Yield; - using Action = Library::Container::Action; const Yield yield = astContainerYield(ftok->astParent()->astOperand1()); - if (yield == Yield::START_ITERATOR || yield == Yield::END_ITERATOR || yield == Yield::AT_INDEX || - yield == Yield::SIZE || yield == Yield::EMPTY || yield == Yield::BUFFER || yield == Yield::BUFFER_NT || - ((yield == Yield::ITEM || yield == Yield::ITERATOR) && astContainerAction(ftok->astParent()->astOperand1()) == Action::NO_ACTION)) + if (yield == Yield::START_ITERATOR || yield == Yield::END_ITERATOR || yield == Yield::SIZE || yield == Yield::EMPTY || + (yield == Yield::ITEM && astContainerAction(ftok->astParent()->astOperand1()) == Library::Container::Action::NO_ACTION)) return Library::UseRetValType::DEFAULT; } if (isNotLibraryFunction(ftok))