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:
parent
ab594763f6
commit
37d52ad572
2 changed files with 14 additions and 1 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 {};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue