<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64378>64378</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Follow IWYU pragma: export transitively
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          VitaNuo
      </td>
    </tr>
</table>

<pre>
    At the moment, we only follow one level of IWYU export pragmas (probably due to the way old IWYU tool behaves).
We're receiving user complaints because of this, and should consider traversing the pragma transitively.
E.g.,

foo.h
```
#include "bar.h" // IWYU pragma: export
```

bar.h
```
#include "baz.h" // IWYU pragma: export
```

baz.h
```
#pragma once
void foo();
```

main.cc
```
#include "foo.h"
void func() {
  foo();
}
```

will currently suggest including "baz.h", which is wrong.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk09r5DgQxT-NfCliZLn_-eBDJ70Ne9nbbtijJJdtDbKq0R_3dD79YMswGciEwICRUZl6v6fykwzBDA6xZftntr8UMsWRfPufifKfRIWi7tGeI8QRYaIJXWTiBe4I5OwDerKW7kAOweKMFqiHv1___xfw-418hJuXwyQDMHG6eVJS2Qd0CSHSKniXDyDb5ZZIZEHhKGcMTDQl4xfGz6_IxNEjeNRoZuMGSAE9aJpuVhoXAyjUMgVc0HE0YbEnXQdhpGQ70OSC6dBD9HJGHxaFBZ2dLVUXTDQz2sdG_KscSiZe8iavPVE5boUD3568FbVx2qYOgQmhpC9HJgQwcWXims-VSaw-b0P5WGddc_9XOG9_yHn7PWebDDmNuTaT6aAnYuLERMPq50-UJ2lcqfUXzpBnKsR7RnI6Q4AdNwp8RD5ePrFwN9aCTt6ji_YBIQ0DhggZvfz-dwNcszwaPYIJcPfkhrLo2rpr6kYW2FaHpuL7444fi7Ft-qppdodaq8O-6gUKoZuq7rqdaiqUShamFVzU_MTrilecH0t-UqdqL3rsq45rpdiO4ySNLa2dp5L8UJgQEraHXX08FVYqtGG9hkI4vMP6cTG5vxS-XXqeVBoC23FrQgw_VaKJFttrvosfZuGXnBfJ23aM8RZYfc4JGkwckyo1TUxcF93t9XTz9A11ZOK6uglMXFe3PwIAAP__Jy1BPw">