mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for 168054, name resolution of parameters in method impls.
This commit is contained in:
parent
a857bb1867
commit
c1ca84452f
2 changed files with 34 additions and 0 deletions
|
@ -89,4 +89,36 @@ public class IndexBindingResolutionBugs extends IndexBindingResolutionTestBase {
|
||||||
getBindingFromASTName("fooovr('", 6);
|
getBindingFromASTName("fooovr('", 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// // header
|
||||||
|
// class Base {
|
||||||
|
// public:
|
||||||
|
// void foo(int i);
|
||||||
|
// int foo2(int i);
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// void func(int k);
|
||||||
|
// void func2(int i);
|
||||||
|
|
||||||
|
// // references
|
||||||
|
// #include "header.h"
|
||||||
|
// void Base::foo(int i) {
|
||||||
|
// i=2;
|
||||||
|
// }
|
||||||
|
// void Base::foo2(int j) {
|
||||||
|
// j=2;
|
||||||
|
// }
|
||||||
|
// void func(int k) {
|
||||||
|
// k=2;
|
||||||
|
// }
|
||||||
|
// void func2(int l) {
|
||||||
|
// l=2;
|
||||||
|
// }
|
||||||
|
public void test168054() {
|
||||||
|
getBindingFromASTName("i=2", 1);
|
||||||
|
getBindingFromASTName("j=2", 1);
|
||||||
|
getBindingFromASTName("k=2", 1);
|
||||||
|
getBindingFromASTName("l=2", 1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -525,6 +525,8 @@ public class CPPVisitor {
|
||||||
} else if( temp instanceof IProblemBinding ){
|
} else if( temp instanceof IProblemBinding ){
|
||||||
//problems with the function, still create binding for the parameter
|
//problems with the function, still create binding for the parameter
|
||||||
binding = new CPPParameter( name );
|
binding = new CPPParameter( name );
|
||||||
|
} else if ( temp instanceof IIndexBinding ) {
|
||||||
|
binding= new CPPParameter( name );
|
||||||
}
|
}
|
||||||
} else if( parent instanceof ICPPASTTemplateDeclaration ) {
|
} else if( parent instanceof ICPPASTTemplateDeclaration ) {
|
||||||
return CPPTemplates.createBinding( param );
|
return CPPTemplates.createBinding( param );
|
||||||
|
|
Loading…
Add table
Reference in a new issue