I've found a minimal example for a case where an included header's missing include is reported as an IWYU error in the .cpp file. (In my case, the equivalents of `b.h` and `c.h` are library headers, so I get an IWYU error in my code and can't easily change the library headers to have correct includes.)
**a.cpp**:
```c++
#include "c.h"
void a(C c) {
c.method(42);
}
```
**b.h**:
```c++
#pragma once
#include <utility>
void b(int&& i);
```
**c.h**:
```c++
#pragma once
#include "b.h"
struct C {
template <typename T>
void method(T&& t) {
return b(std::forward<T>(t));
}
};
```
Command line:
```
$ include-what-you-use a.cpp
a.cpp should add these lines:
#include <utility> // for forward
a.cpp should remove these lines:
The full include-list for a.cpp:
#include <utility> // for forward
#include "c.h" // for C
---
```
Here, `c.h` should `#include <utility>` and `b.h` should not, but IWYU should not suggest anything to be changed in `a.cpp`.