HomePhabricator

Fix the DeclContextLookupResult::iterator non-copyable.

Authored by hokein on Nov 10 2020, 11:09 AM.

Description

Fix the DeclContextLookupResult::iterator non-copyable.

The value_type is a const pointer, which makes the iteator non-copyable.
Before the patch, the normal usage like below was illegal:

auto It = lookupresult.begin();
...
It = lookupresult.end(); // the copy is not allowed.

Differential Revision: https://reviews.llvm.org/D91158

Details