Dereference.

This commit is contained in:
chriseth
2021-01-12 14:28:27 +01:00
parent 7487a7d927
commit 24aded266e
3 changed files with 42 additions and 2 deletions
+2 -2
View File
@@ -34,6 +34,7 @@
#include <libsolutil/Algorithms.h>
#include <libsolutil/StringUtils.h>
#include <libsolutil/Views.h>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/predicate.hpp>
@@ -1002,9 +1003,8 @@ void TypeChecker::endVisit(TryStatement const& _tryStatement)
TryCatchClause const* panicClause = nullptr;
TryCatchClause const* errorClause = nullptr;
TryCatchClause const* lowLevelClause = nullptr;
for (auto const& clausePointer: _tryStatement.clauses() | ranges::views::drop_exactly(1))
for (auto const& clause: _tryStatement.clauses() | ranges::views::drop_exactly(1) | views::dereferenceChecked)
{
TryCatchClause const& clause = *clausePointer;
if (clause.errorName() == "")
{
if (lowLevelClause)