mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Bug 421398 - Organize Includes not adds includes for base class.
This commit is contained in:
parent
6f2c349bc3
commit
24922585f0
2 changed files with 12 additions and 1 deletions
|
@ -411,6 +411,17 @@ public class BindingClassifierTest extends OneSourceMultipleHeadersTestCase {
|
|||
assertDeclared();
|
||||
}
|
||||
|
||||
// class Base {};
|
||||
|
||||
// class Derived : public Base {
|
||||
// public:
|
||||
// Derived();
|
||||
// };
|
||||
public void testBaseClause_421398() throws Exception {
|
||||
assertDefined("Base");
|
||||
assertDeclared();
|
||||
}
|
||||
|
||||
// struct A {};
|
||||
// template<typename T> struct B {};
|
||||
// template<typename T, typename U = B<T>> struct C {};
|
||||
|
|
|
@ -516,7 +516,7 @@ public class BindingClassifier {
|
|||
// Record the fact that we also have a definition of the typedef's target 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.
|
||||
ICPPClassType[] bases = ClassTypeHelper.getAllBases((ICPPClassType) binding, fAst);
|
||||
for (ICPPClassType base : bases) {
|
||||
|
|
Loading…
Add table
Reference in a new issue