From 0b66eb38c78129f48cc65bbe6867dfc67abae6df Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 1 May 2010 00:40:08 +0000 Subject: 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. llvm-svn: 102818 --- clang/lib/Sema/SemaExpr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index d8d525e9920..a1b66cd9460 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/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; -- cgit v1.2.3