зеркало из https://github.com/microsoft/clang-1.git
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
01aec11c8c
Коммит
d490f953e8
|
@ -222,7 +222,7 @@ public:
|
||||||
if (NamedDecl *ND = DeclOrIterator.dyn_cast<NamedDecl *>())
|
if (NamedDecl *ND = DeclOrIterator.dyn_cast<NamedDecl *>())
|
||||||
return reference(ND, SingleDeclIndex);
|
return reference(ND, SingleDeclIndex);
|
||||||
|
|
||||||
return *DeclOrIterator.get<DeclIndexPair*>();
|
return *DeclOrIterator.get<const DeclIndexPair*>();
|
||||||
}
|
}
|
||||||
|
|
||||||
pointer operator->() const {
|
pointer operator->() const {
|
||||||
|
@ -230,13 +230,13 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
friend bool operator==(const iterator &X, const iterator &Y) {
|
friend bool operator==(const iterator &X, const iterator &Y) {
|
||||||
return X.DeclOrIterator == Y.DeclOrIterator &&
|
return X.DeclOrIterator.getOpaqueValue()
|
||||||
|
== Y.DeclOrIterator.getOpaqueValue() &&
|
||||||
X.SingleDeclIndex == Y.SingleDeclIndex;
|
X.SingleDeclIndex == Y.SingleDeclIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
friend bool operator!=(const iterator &X, const iterator &Y) {
|
friend bool operator!=(const iterator &X, const iterator &Y) {
|
||||||
return X.DeclOrIterator != Y.DeclOrIterator ||
|
return !(X == Y);
|
||||||
X.SingleDeclIndex != Y.SingleDeclIndex;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче