mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 15:05: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;
|
||||
// a.assign("aaa");
|
||||
// }
|
||||
public void _testTemplateClassMethod_207320() throws Exception {
|
||||
public void testTemplateClassMethod_207320() throws Exception {
|
||||
StringBuffer[] buffers= getContents(2);
|
||||
String hcode= buffers[0].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.IProblemBinding;
|
||||
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.IIndexManager;
|
||||
import org.eclipse.cdt.core.index.IIndexName;
|
||||
|
@ -137,11 +137,11 @@ public class OpenDeclarationsAction extends SelectionParseAction {
|
|||
if (binding != null && !(binding instanceof IProblemBinding)) {
|
||||
IName[] declNames = findNames(fIndex, ast, isDefinition, binding);
|
||||
if (declNames.length == 0) {
|
||||
if(binding instanceof ICPPTemplateInstance) {
|
||||
if (binding instanceof ICPPSpecialization) {
|
||||
// bug 207320, handle template instances
|
||||
IBinding definition= ((ICPPTemplateInstance)binding).getTemplateDefinition();
|
||||
if(definition != null && !(definition instanceof IProblemBinding)) {
|
||||
declNames = findNames(fIndex, ast, true, definition);
|
||||
IBinding specialized= ((ICPPSpecialization) binding).getSpecializedBinding();
|
||||
if (specialized != null && !(specialized instanceof IProblemBinding)) {
|
||||
declNames = findNames(fIndex, ast, true, specialized);
|
||||
}
|
||||
} else if (binding instanceof ICPPMethod) {
|
||||
// bug 86829, handle implicit methods.
|
||||
|
|
Loading…
Add table
Reference in a new issue