Skip to content

Constructor call of a sugared type should not consider the underly type as a use  #59916

Open
@hokein

Description

@hokein

For the Bar(); usage in main.cpp, include-cleaner considers both UsingType (Bar) and the underlying type (Foo) Foo constructor as uses (thus we insert both foo.h, and bar.h). In this case, we should not consider the underlying type Foo as a use.

// foo.h
namespace ns {
class Foo {};
}

// bar.h
namespace ns2 {
using Bar = ns::Foo;
}

// main.cpp
#include "bar.h"
void k() {
   ns2::Bar();  
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions