summaryrefslogtreecommitdiffstats
path: root/include/clang/AST/UnresolvedSet.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
committerdim <dim@FreeBSD.org>2013-12-22 00:07:40 +0000
commit952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch)
treedf8df0b0067b381eab470a3b8f28d14a552a6340 /include/clang/AST/UnresolvedSet.h
parentea266cad53e3d49771fa38103913d3ec7a166694 (diff)
downloadFreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip
FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'include/clang/AST/UnresolvedSet.h')
-rw-r--r--include/clang/AST/UnresolvedSet.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/include/clang/AST/UnresolvedSet.h b/include/clang/AST/UnresolvedSet.h
index d26065e..759af25 100644
--- a/include/clang/AST/UnresolvedSet.h
+++ b/include/clang/AST/UnresolvedSet.h
@@ -51,6 +51,7 @@ public:
typedef std::iterator_traits<IteratorTy>::iterator_category iterator_category;
NamedDecl *getDecl() const { return ir->getDecl(); }
+ void setDecl(NamedDecl *ND) const { return ir->setDecl(ND); }
AccessSpecifier getAccess() const { return ir->getAccess(); }
void setAccess(AccessSpecifier AS) { ir->setAccess(AS); }
DeclAccessPair getPair() const { return *ir; }
@@ -88,7 +89,7 @@ public:
bool operator>(const UnresolvedSetIterator &o) const { return ir > o.ir; }
};
-/// UnresolvedSet - A set of unresolved declarations.
+/// \brief A set of unresolved declarations.
class UnresolvedSetImpl {
typedef SmallVectorImpl<DeclAccessPair> DeclsTy;
@@ -139,15 +140,9 @@ public:
I.ir->set(New, AS);
}
- void erase(unsigned I) {
- decls()[I] = decls().back();
- decls().pop_back();
- }
+ void erase(unsigned I) { decls()[I] = decls().pop_back_val(); }
- void erase(iterator I) {
- *I.ir = decls().back();
- decls().pop_back();
- }
+ void erase(iterator I) { *I.ir = decls().pop_back_val(); }
void setAccess(iterator I, AccessSpecifier AS) {
I.ir->setAccess(AS);
@@ -177,7 +172,7 @@ private:
}
};
-/// A set of unresolved declarations
+/// \brief A set of unresolved declarations.
template <unsigned InlineCapacity> class UnresolvedSet :
public UnresolvedSetImpl {
SmallVector<DeclAccessPair, InlineCapacity> Decls;
OpenPOWER on IntegriCloud