forked from OSchip/llvm-project
Replace an unnecessary null check with an assert; NFC
This commit is contained in:
parent
2456e11614
commit
65bcdeaa15
|
@ -1219,8 +1219,10 @@ bool DeclContext::Encloses(const DeclContext *DC) const {
|
||||||
|
|
||||||
DeclContext *DeclContext::getNonTransparentContext() {
|
DeclContext *DeclContext::getNonTransparentContext() {
|
||||||
DeclContext *DC = this;
|
DeclContext *DC = this;
|
||||||
while (DC && DC->isTransparentContext())
|
while (DC->isTransparentContext()) {
|
||||||
DC = DC->getParent();
|
DC = DC->getParent();
|
||||||
|
assert(DC && "All transparent contexts should have a parent!");
|
||||||
|
}
|
||||||
return DC;
|
return DC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue