For this 4-file setup, clang-tidy reports that `bar.hpp` is unused in `main.cpp`. But this is incorrect, it is necessary for the example to compile.
```c++
// main.cpp
#include "call_bar.hpp"
#include "bar.hpp"
#include "base.hpp"
int main() {
return call_bar(Base());
}
```
```c++
// call_bar.hpp
#ifndef CALL_BAR_HPP
#define CALL_BAR_HPP
template <typename T>
int call_bar(T t) {
return bar(t);
}
#endif
```
```c++
// bar.hpp
#ifndef BAR_HPP
#define BAR_HPP
#include "base.hpp"
int bar(Base) {
return 0;
}
#endif
```
```c++
// base.hpp
#ifndef BASE_HPP
#define BASE_HPP
struct Base {};
#endif
```
For this 4-file setup, clang-tidy reports that
bar.hpp
is unused inmain.cpp
. But this is incorrect, it is necessary for the example to compile.