1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-13 19:25:38 +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 ab594763f6
commit 37d52ad572
2 changed files with 14 additions and 1 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

@ -521,6 +521,8 @@ public class BindingClassifier {
ICPPClassType[] bases = ClassTypeHelper.getAllBases((ICPPClassType) binding, fAst);
for (ICPPClassType base : bases) {
fProcessedDefinedBindings.add(base);
fBindingsToDefine.remove(base);
fBindingsToDeclare.remove(base);
}
}