diff options
author | John McCall <rjmccall@apple.com> | 2010-05-01 00:40:08 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-05-01 00:40:08 +0000 |
commit | 77bb1aa78bcd26e42c0382043e65a2b03242be4d (patch) | |
tree | 89f763410c2fae9ecf90794c55bef618b65a9d42 /lib/Sema/SemaExpr.cpp | |
parent | cdb65d8724428664af7394451863b4aa6123f52b (diff) |
It turns out that basically every caller to RequireCompleteDeclContext
already knows what context it's looking in. Just pass that context in
instead of (questionably) recalculating it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d8d525e992..a1b66cd946 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1238,7 +1238,7 @@ Sema::BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, if (!(DC = computeDeclContext(SS, false)) || DC->isDependentContext()) return BuildDependentDeclRefExpr(SS, Name, NameLoc, 0); - if (RequireCompleteDeclContext(SS)) + if (RequireCompleteDeclContext(SS, DC)) return ExprError(); LookupResult R(*this, Name, NameLoc, LookupOrdinaryName); @@ -2582,7 +2582,7 @@ LookupMemberExprInRecord(Sema &SemaRef, LookupResult &R, // nested-name-specifier. DC = SemaRef.computeDeclContext(SS, false); - if (SemaRef.RequireCompleteDeclContext(SS)) { + if (SemaRef.RequireCompleteDeclContext(SS, DC)) { SemaRef.Diag(SS.getRange().getEnd(), diag::err_typecheck_incomplete_tag) << SS.getRange() << DC; return true; |