mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-05 14:43:36 +02:00
Fix for bug 207320.
This commit is contained in:
parent
52dda7b84f
commit
01959bfd25
2 changed files with 6 additions and 6 deletions
|
@ -179,7 +179,7 @@ public abstract class CPPSelectionTestsAnyIndexer extends BaseSelectionTestsInde
|
||||||
// C<char> a;
|
// C<char> a;
|
||||||
// a.assign("aaa");
|
// a.assign("aaa");
|
||||||
// }
|
// }
|
||||||
public void _testTemplateClassMethod_207320() throws Exception {
|
public void testTemplateClassMethod_207320() throws Exception {
|
||||||
StringBuffer[] buffers= getContents(2);
|
StringBuffer[] buffers= getContents(2);
|
||||||
String hcode= buffers[0].toString();
|
String hcode= buffers[0].toString();
|
||||||
String scode= buffers[1].toString();
|
String scode= buffers[1].toString();
|
||||||
|
|
|
@ -40,7 +40,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
import org.eclipse.cdt.core.dom.ast.IProblemBinding;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
|
||||||
import org.eclipse.cdt.core.index.IIndex;
|
import org.eclipse.cdt.core.index.IIndex;
|
||||||
import org.eclipse.cdt.core.index.IIndexManager;
|
import org.eclipse.cdt.core.index.IIndexManager;
|
||||||
import org.eclipse.cdt.core.index.IIndexName;
|
import org.eclipse.cdt.core.index.IIndexName;
|
||||||
|
@ -137,11 +137,11 @@ public class OpenDeclarationsAction extends SelectionParseAction {
|
||||||
if (binding != null && !(binding instanceof IProblemBinding)) {
|
if (binding != null && !(binding instanceof IProblemBinding)) {
|
||||||
IName[] declNames = findNames(fIndex, ast, isDefinition, binding);
|
IName[] declNames = findNames(fIndex, ast, isDefinition, binding);
|
||||||
if (declNames.length == 0) {
|
if (declNames.length == 0) {
|
||||||
if(binding instanceof ICPPTemplateInstance) {
|
if (binding instanceof ICPPSpecialization) {
|
||||||
// bug 207320, handle template instances
|
// bug 207320, handle template instances
|
||||||
IBinding definition= ((ICPPTemplateInstance)binding).getTemplateDefinition();
|
IBinding specialized= ((ICPPSpecialization) binding).getSpecializedBinding();
|
||||||
if(definition != null && !(definition instanceof IProblemBinding)) {
|
if (specialized != null && !(specialized instanceof IProblemBinding)) {
|
||||||
declNames = findNames(fIndex, ast, true, definition);
|
declNames = findNames(fIndex, ast, true, specialized);
|
||||||
}
|
}
|
||||||
} else if (binding instanceof ICPPMethod) {
|
} else if (binding instanceof ICPPMethod) {
|
||||||
// bug 86829, handle implicit methods.
|
// bug 86829, handle implicit methods.
|
||||||
|
|
Loading…
Add table
Reference in a new issue