aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 60ea138..1f398bb 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -131,8 +131,8 @@ private:
}
// Add the new element to the end of the vector.
- DeclOrVector.get<DeclIndexPairVector *>()->push_back(
- DeclIndexPair(ND, Index));
+ cast<DeclIndexPairVector *>(DeclOrVector)
+ ->push_back(DeclIndexPair(ND, Index));
}
~ShadowMapEntry() {
@@ -659,13 +659,13 @@ public:
: DeclOrIterator(Iterator), SingleDeclIndex(0) {}
iterator &operator++() {
- if (DeclOrIterator.is<const NamedDecl *>()) {
+ if (isa<const NamedDecl *>(DeclOrIterator)) {
DeclOrIterator = (NamedDecl *)nullptr;
SingleDeclIndex = 0;
return *this;
}
- const DeclIndexPair *I = DeclOrIterator.get<const DeclIndexPair *>();
+ const DeclIndexPair *I = cast<const DeclIndexPair *>(DeclOrIterator);
++I;
DeclOrIterator = I;
return *this;
@@ -681,7 +681,7 @@ public:
if (const NamedDecl *ND = DeclOrIterator.dyn_cast<const NamedDecl *>())
return reference(ND, SingleDeclIndex);
- return *DeclOrIterator.get<const DeclIndexPair *>();
+ return *cast<const DeclIndexPair *>(DeclOrIterator);
}
pointer operator->() const { return pointer(**this); }
@@ -705,15 +705,15 @@ ResultBuilder::ShadowMapEntry::begin() const {
if (const NamedDecl *ND = DeclOrVector.dyn_cast<const NamedDecl *>())
return iterator(ND, SingleDeclIndex);
- return iterator(DeclOrVector.get<DeclIndexPairVector *>()->begin());
+ return iterator(cast<DeclIndexPairVector *>(DeclOrVector)->begin());
}
ResultBuilder::ShadowMapEntry::iterator
ResultBuilder::ShadowMapEntry::end() const {
- if (DeclOrVector.is<const NamedDecl *>() || DeclOrVector.isNull())
+ if (isa<const NamedDecl *>(DeclOrVector) || DeclOrVector.isNull())
return iterator();
- return iterator(DeclOrVector.get<DeclIndexPairVector *>()->end());
+ return iterator(cast<DeclIndexPairVector *>(DeclOrVector)->end());
}
/// Compute the qualification required to get from the current context