You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "test.cpp"
No compilation database found in /home/harald or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
116 warnings generated.
/home/harald/test.cpp:3:99: warning: use c++14 style type templates [modernize-type-traits]
3 | struct S { template <class U, class = std::enable_if_t<!std::is_same_v<S, std::remove_reference_t<U>>>> S(U); };
| ^
| _t
Suppressed 114 warnings (114 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
It appears that clang-tidy-19 is getting confused by std::remove_reference_t's definition being in terms of std::remove_reference, ultimately the same issue as #67896. However, that issue should not be hit here because the location of std::remove_reference should be the system headers, and that should cause the warning to be suppressed. Because it is detected at the wrong location, the warning does not get suppressed.
No warning is emitted for this on clang-tidy-18.
The text was updated successfully, but these errors were encountered:
This is heavily reduced from real code:
```c++
#include <utility>
template <class T>
struct S { template <class U, class = std::enable_if_t<!std::is_same_v<S, std::remove_reference_t<U>>>> S(U); };
S<int> s(std::move(1));
```
Running `clang-tidy-19 --checks=modernize-type-traits test.cpp` produces:
```
Error while trying to load a compilation database:
Could not auto-detect compilation database for file "test.cpp"
No compilation database found in /home/harald or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
116 warnings generated.
/home/harald/test.cpp:3:99: warning: use c++14 style type templates [modernize-type-traits]
3 | struct S { template <class U, class = std::enable_if_t<!std::is_same_v<S, std::remove_reference_t<U>>>> S(U); };
| ^
| _t
Suppressed 114 warnings (114 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
```
It appears that `clang-tidy-19` is getting confused by `std::remove_reference_t`'s definition being in terms of `std::remove_reference`, ultimately the same issue as #67896. However, that issue should not be hit here because the location of `std::remove_reference` should be the system headers, and that should cause the warning to be suppressed. Because it is detected at the wrong location, the warning does not get suppressed.
This is heavily reduced from real code:
Running
clang-tidy-19 --checks=modernize-type-traits test.cpp
produces:It appears that
clang-tidy-19
is getting confused bystd::remove_reference_t
's definition being in terms ofstd::remove_reference
, ultimately the same issue as #67896. However, that issue should not be hit here because the location ofstd::remove_reference
should be the system headers, and that should cause the warning to be suppressed. Because it is detected at the wrong location, the warning does not get suppressed.No warning is emitted for this on
clang-tidy-18
.The text was updated successfully, but these errors were encountered: