Skip to content

[clang-include-cleaner] unnecessary include suggested when including fully contained header #132272

Open
@firewave

Description

@firewave

test.h

#include <string>

struct S
{
    const std::string& str() const;
    std::string mStr;
};

test.cpp

#include "test.h"

const std::string& S::str() const
{
    return mStr;
}
$ clang-include-cleaner --print=changes test.cpp
[...]
+ <string>

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