|
@@ -4542,8 +4542,10 @@ void Sema::CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS,
|
|
|
bool EnteringContext) {
|
|
|
if (!SS.getScopeRep() || !CodeCompleter)
|
|
|
return;
|
|
|
-
|
|
|
- DeclContext *Ctx = computeDeclContext(SS, EnteringContext);
|
|
|
+
|
|
|
+ // Always pretend to enter a context to ensure that a dependent type
|
|
|
+ // resolves to a dependent record.
|
|
|
+ DeclContext *Ctx = computeDeclContext(SS, /*EnteringContext=*/true);
|
|
|
if (!Ctx)
|
|
|
return;
|
|
|
|
|
@@ -4573,7 +4575,9 @@ void Sema::CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS,
|
|
|
Results.ExitScope();
|
|
|
|
|
|
CodeCompletionDeclConsumer Consumer(Results, CurContext);
|
|
|
- LookupVisibleDecls(Ctx, LookupOrdinaryName, Consumer);
|
|
|
+ LookupVisibleDecls(Ctx, LookupOrdinaryName, Consumer,
|
|
|
+ /*IncludeGlobalScope=*/true,
|
|
|
+ /*IncludeDependentBases=*/true);
|
|
|
|
|
|
HandleCodeCompleteResults(this, CodeCompleter,
|
|
|
Results.getCompletionContext(),
|