diff options
| author | Serge Pavlov <sepavloff@gmail.com> | 2015-08-23 11:09:40 +0000 |
|---|---|---|
| committer | Serge Pavlov <sepavloff@gmail.com> | 2015-08-23 11:09:40 +0000 |
| commit | b24a7111b451e8b556824634e08bcf81fd36d255 (patch) | |
| tree | 64a6f2a9d92333cb48d0bc595a8fab7b847e51ee /clang | |
| parent | 73c6a2448f24d13e16f34d46095ef7ad4bd1f145 (diff) | |
| download | bcm5719-llvm-b24a7111b451e8b556824634e08bcf81fd36d255.tar.gz bcm5719-llvm-b24a7111b451e8b556824634e08bcf81fd36d255.zip | |
Changes missed from r245810
llvm-svn: 245811
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/AST/DeclBase.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 00d7d323b72..c34126ee18d 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -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; } |

