forked from OSchip/llvm-project
AST: Avoid using SmallVector::set_size() in UnresolvedSet
Update UnresolvedSet to use (and expose) `SmallVector::truncate()` instead of `SmallVector::set_size()`. The latter is going to made private in a future commit to avoid misuse. Differential Revision: https://reviews.llvm.org/D115386
This commit is contained in:
parent
e976c457c5
commit
3110060bc7
|
@ -121,7 +121,7 @@ public:
|
|||
void setAccess(iterator I, AccessSpecifier AS) { I.I->setAccess(AS); }
|
||||
|
||||
void clear() { decls().clear(); }
|
||||
void set_size(unsigned N) { decls().set_size(N); }
|
||||
void truncate(unsigned N) { decls().truncate(N); }
|
||||
|
||||
bool empty() const { return decls().empty(); }
|
||||
unsigned size() const { return decls().size(); }
|
||||
|
|
|
@ -620,7 +620,7 @@ void LookupResult::resolveKind() {
|
|||
getSema().diagnoseEquivalentInternalLinkageDeclarations(
|
||||
getNameLoc(), HasNonFunction, EquivalentNonFunctions);
|
||||
|
||||
Decls.set_size(N);
|
||||
Decls.truncate(N);
|
||||
|
||||
if (HasNonFunction && (HasFunction || HasUnresolved))
|
||||
Ambiguous = true;
|
||||
|
|
Loading…
Reference in New Issue