mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
References to template parameters stored in index, bug 256095
This commit is contained in:
parent
7db7ce6ac9
commit
3898f8eaa7
1 changed files with 12 additions and 8 deletions
|
@ -38,8 +38,10 @@ import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||||
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
import org.eclipse.cdt.core.dom.ast.ITypedef;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPDeferredTemplateInstance;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
|
||||||
import org.eclipse.cdt.core.index.IIndexFileLocation;
|
import org.eclipse.cdt.core.index.IIndexFileLocation;
|
||||||
import org.eclipse.cdt.core.parser.IProblem;
|
import org.eclipse.cdt.core.parser.IProblem;
|
||||||
|
@ -243,17 +245,19 @@ abstract public class PDOMWriter {
|
||||||
if (fShowProblems) {
|
if (fShowProblems) {
|
||||||
reportProblem((IProblemBinding) binding);
|
reportProblem((IProblemBinding) binding);
|
||||||
}
|
}
|
||||||
}
|
} else if (name.isReference()) {
|
||||||
else if (name.isReference()) {
|
if (binding instanceof ICPPTemplateParameter ||
|
||||||
if ((fSkipReferences & SKIP_TYPE_REFERENCES) != 0) {
|
binding instanceof ICPPDeferredTemplateInstance ||
|
||||||
if (isTypeReferenceBinding(binding) && !isRequiredReference(name)) {
|
((fSkipReferences & SKIP_TYPE_REFERENCES) != 0 && isTypeReferenceBinding(binding))) {
|
||||||
|
if (!isRequiredReference(name)) {
|
||||||
na[0]= null;
|
na[0]= null;
|
||||||
fStatistics.fReferenceCount--;
|
} else {
|
||||||
|
fStatistics.fReferenceCount++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
fStatistics.fReferenceCount++;
|
||||||
}
|
}
|
||||||
fStatistics.fReferenceCount++;
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
fStatistics.fDeclarationCount++;
|
fStatistics.fDeclarationCount++;
|
||||||
}
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue