mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-21 15:23:59 +02:00
Bug 421398 - Organize Includes not adds includes for base class.
This commit is contained in:
parent
79b3399977
commit
f923ac3342
2 changed files with 12 additions and 1 deletions
|
@ -411,6 +411,17 @@ public class BindingClassifierTest extends OneSourceMultipleHeadersTestCase {
|
||||||
assertDeclared();
|
assertDeclared();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// class Base {};
|
||||||
|
|
||||||
|
// class Derived : public Base {
|
||||||
|
// public:
|
||||||
|
// Derived();
|
||||||
|
// };
|
||||||
|
public void testBaseClause_421398() throws Exception {
|
||||||
|
assertDefined("Base");
|
||||||
|
assertDeclared();
|
||||||
|
}
|
||||||
|
|
||||||
// struct A {};
|
// struct A {};
|
||||||
// template<typename T> struct B {};
|
// template<typename T> struct B {};
|
||||||
// template<typename T, typename U = B<T>> struct C {};
|
// template<typename T, typename U = B<T>> struct C {};
|
||||||
|
|
|
@ -515,7 +515,7 @@ public class BindingClassifier {
|
||||||
// Record the fact that we also have a definition of the typedef's target type.
|
// Record the fact that we also have a definition of the typedef's target type.
|
||||||
markAsDefined((IBinding) type);
|
markAsDefined((IBinding) type);
|
||||||
}
|
}
|
||||||
} else if (binding instanceof ICPPClassType) {
|
} else if (binding instanceof ICPPClassType && fAst.getDefinitionsInAST(binding).length == 0) {
|
||||||
// The header that defines a class must provide definitions of all its base classes.
|
// The header that defines a class must provide definitions of all its base classes.
|
||||||
ICPPClassType[] bases = ClassTypeHelper.getAllBases((ICPPClassType) binding, fAst);
|
ICPPClassType[] bases = ClassTypeHelper.getAllBases((ICPPClassType) binding, fAst);
|
||||||
for (ICPPClassType base : bases) {
|
for (ICPPClassType base : bases) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue