mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
Bug 417240 - Organize Includes inserts unnecessary include for the
header declaring a base class
This commit is contained in:
parent
b5c632f3af
commit
a5fafa3428
2 changed files with 13 additions and 0 deletions
|
@ -388,6 +388,17 @@ public class BindingClassifierTest extends OneSourceMultipleHeadersTestCase {
|
|||
assertDeclared("A");
|
||||
}
|
||||
|
||||
// class A {};
|
||||
// class B : public A {};
|
||||
|
||||
// void test(B* b) {
|
||||
// const A* a = b;
|
||||
// }
|
||||
public void testBaseClass() throws Exception {
|
||||
assertDefined("B");
|
||||
assertDeclared();
|
||||
}
|
||||
|
||||
// struct A {};
|
||||
// template<typename T> struct B {};
|
||||
// template<typename T, typename U = B<T>> struct C {};
|
||||
|
|
|
@ -520,6 +520,8 @@ public class BindingClassifier {
|
|||
ICPPClassType[] bases = ClassTypeHelper.getAllBases((ICPPClassType) binding, fAst);
|
||||
for (ICPPClassType base : bases) {
|
||||
fProcessedDefinedBindings.add(base);
|
||||
fBindingsToDefine.remove(base);
|
||||
fBindingsToDeclare.remove(base);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue