diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2012-03-10 07:47:07 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2012-03-10 07:47:07 +0000 |
commit | 1659c3758b4b2dbd618aed9ff8d1863f11b1bd9b (patch) | |
tree | 3a479c4f765fe2e42ee85faee1ec4a9140cb175b /lib/Sema/SemaDecl.cpp | |
parent | 8d17681906209923fad4a02d829a857a447f137b (diff) |
Slightly tweak this condition. "isTransparentContext()" was checking whether an
enum is scoped or not, which is not relevant here. Instead, phrase the loop in
the same terms that the standard uses, instead of this awkward set of
conditions that is *nearly* equal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 532767b64c..e3527a8289 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -8092,8 +8092,7 @@ Decl *Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, // Find the context where we'll be declaring the tag. // FIXME: We would like to maintain the current DeclContext as the // lexical context, - while (SearchDC->isRecord() || SearchDC->isTransparentContext() || - SearchDC->isObjCContainer()) + while (!SearchDC->isFileContext() && !SearchDC->isFunctionOrMethod()) SearchDC = SearchDC->getParent(); // Find the scope where we'll be declaring the tag. |