Kaydet (Commit) a96a260a authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Stephan Bergmann

tdf#117918 codemaker: avoid including ourselves in .hpp files

It's pointless, include guards will make sure it's a NOP, but it
confuses tools like IWYU.

Change-Id: Ic1f56ef267954cdf8bf3cb4f4a5e841d5e4bb82a
Reviewed-on: https://gerrit.libreoffice.org/55354Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst ddbf228b
......@@ -161,7 +161,10 @@ void Includes::dump(
if (m_hpp || pair.second == Dependencies::KIND_BASE
|| !isInterfaceType(u2b(pair.first)))
{
dumpInclude(out, u2b(pair.first), m_hpp);
// If we know our name, then avoid including ourselves.
if (!companionHdl || *companionHdl != pair.first) {
dumpInclude(out, u2b(pair.first), m_hpp);
}
} else {
bool ns = dumpNamespaceOpen(out, pair.first, false);
if (ns) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment