Closed
Description
Take the following example code that implements the log2
function with a custom implementation:
constexpr int log2()
{
int output = 0;
return output;
}
clang-tidy trunk gives:
[<[source>:1:15: warning: no header providing "log2" is directly included [misc-include-cleaner]]
1 | constexpr int log2()
| ^
[<source>:3:9: warning: no header providing "output" is directly included [misc-include-cleaner]]
3 | int output = 0;
| ^
2 warnings generated.
Which seems incorrect. Repro: https://godbolt.org/z/roM8E34ce