Issue 174827
Summary [clang-tidy] readability-unnecessary-typename removes necessary typename
Labels clang-tidy
Assignees
Reporter R-Goc
    ```cpp
template<typename T, typename = void>
struct Formatter {
    using __no_formatter_defined = void;
};

template<typename T, typename = void>
constexpr bool HasFormatter = true;

template<typename T>
constexpr bool HasFormatter<T, typename Formatter<T>::__no_formatter_defined> = false;
```

godbolt link: https://godbolt.org/z/61W8sdb3n

After removing: 
```
<source>:10:33: error: template argument for template type parameter must be a type; did you forget 'typename'? [clang-diagnostic-error]
   10 | constexpr bool HasFormatter<T,  Formatter<T>::__no_formatter_defined> = false;
      | ^
      | typename 
<source>:6:31: note: template parameter is declared here
    6 | template<typename T, typename = void>
      | 
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to