mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 421823 - Allow consumers other than content assist to perform
heuristic base class lookup Change-Id: I8add635bb62a0241b7de9430a32f85499535085d Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
This commit is contained in:
parent
28ed0a3d7a
commit
001e2c82f0
3 changed files with 6 additions and 1 deletions
|
@ -238,7 +238,7 @@ class BaseClassLookup {
|
|||
}
|
||||
|
||||
ICPPClassType grandBaseClass = (ICPPClassType) grandBaseBinding;
|
||||
if (data.contentAssist && grandBaseClass instanceof ICPPDeferredClassInstance) {
|
||||
if (data.fHeuristicBaseLookup && grandBaseClass instanceof ICPPDeferredClassInstance) {
|
||||
// Support content assist for members of deferred instances.
|
||||
grandBaseClass= ((ICPPDeferredClassInstance) grandBaseClass).getClassTemplate();
|
||||
}
|
||||
|
|
|
@ -1151,6 +1151,7 @@ public class CPPSemantics {
|
|||
ld2.setIgnorePointOfDeclaration(data.isIgnorePointOfDeclaration());
|
||||
ld2.contentAssist= data.contentAssist;
|
||||
ld2.fNoNarrowing= data.fNoNarrowing;
|
||||
ld2.fHeuristicBaseLookup= data.fHeuristicBaseLookup;
|
||||
ld2.qualified= parent instanceof ICPPASTQualifiedName;
|
||||
ld2.typesOnly= true;
|
||||
lookup(ld2, getLookupScope(typeDtorName));
|
||||
|
@ -3787,6 +3788,7 @@ public class CPPSemantics {
|
|||
String[] additionalNamespaces) {
|
||||
LookupData data = createLookupData(name);
|
||||
data.contentAssist = true;
|
||||
data.fHeuristicBaseLookup = true;
|
||||
data.setPrefixLookup(prefixLookup);
|
||||
data.foundItems = new CharArrayObjectMap<>(2);
|
||||
|
||||
|
|
|
@ -103,6 +103,9 @@ public class LookupData extends ScopeLookupData {
|
|||
public boolean argsContainImpliedObject;
|
||||
/** In list-initialization **/
|
||||
public boolean fNoNarrowing;
|
||||
/** When doing lookup in base classes, replace deferred class instances with their class template.
|
||||
* This is used by editor actions like content assist. */
|
||||
public boolean fHeuristicBaseLookup;
|
||||
|
||||
private IASTDeclarator fDeclarator;
|
||||
private boolean fFunctionCall;
|
||||
|
|
Loading…
Add table
Reference in a new issue