[PATCH] D115386: AST: Avoid using SmallVector::set_size() in UnresolvedSet
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 11 17:48:26 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3110060bc721: AST: Avoid using SmallVector::set_size() in UnresolvedSet (authored by dexonsmith).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115386/new/
https://reviews.llvm.org/D115386
Files:
clang/include/clang/AST/UnresolvedSet.h
clang/lib/Sema/SemaLookup.cpp
Index: clang/lib/Sema/SemaLookup.cpp
===================================================================
--- clang/lib/Sema/SemaLookup.cpp
+++ clang/lib/Sema/SemaLookup.cpp
@@ -620,7 +620,7 @@
getSema().diagnoseEquivalentInternalLinkageDeclarations(
getNameLoc(), HasNonFunction, EquivalentNonFunctions);
- Decls.set_size(N);
+ Decls.truncate(N);
if (HasNonFunction && (HasFunction || HasUnresolved))
Ambiguous = true;
Index: clang/include/clang/AST/UnresolvedSet.h
===================================================================
--- clang/include/clang/AST/UnresolvedSet.h
+++ clang/include/clang/AST/UnresolvedSet.h
@@ -121,7 +121,7 @@
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(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115386.399148.patch
Type: text/x-patch
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220112/b52a7581/attachment.bin>
More information about the cfe-commits
mailing list