1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

Bug 417240 - Organize Includes inserts unnecessary include for the

header declaring a base class
This commit is contained in:
Sergey Prigogin 2013-09-13 16:46:23 -07:00
parent b5c632f3af
commit a5fafa3428
2 changed files with 13 additions and 0 deletions

View file

@ -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 {};

View file

@ -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);
}
}