Changes missed from r245810

llvm-svn: 245811
This commit is contained in:
Serge Pavlov 2015-08-23 11:09:40 +00:00
parent 73c6a2448f
commit b24a7111b4
1 changed files with 3 additions and 3 deletions

View File

@ -268,13 +268,13 @@ void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
bool Decl::isLexicallyWithinFunctionOrMethod() const {
const DeclContext *LDC = getLexicalDeclContext();
do {
while (true) {
if (LDC->isFunctionOrMethod())
return true;
if (!isa<TagDecl>(LDC))
return false;
LDC = LDC->getParent();
} while (LDC);
LDC = LDC->getLexicalParent();
}
return false;
}