A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/llvm/llvm-project/issues/55962 below:

[Clang] Poor diagnostics for use of a template class without providing parameters in some contexts · Issue #55962 · llvm/llvm-project · GitHub

Godbolt

template <typename T>
struct x;

template <typename T>
constexpr int y = x::a; // Clang diagnostic doesn't mention that `x` is a template.

using z = x; // Clang diagnostic mentions that `x` is a template.

In the definition of y, Clang complains that x isn't a "class, namespace, or enumeration", but fails to mention that it is a class template and no template parameters have been provided.

In other simpler contexts, such as the definition of the using alias y, Clang does explain that x is a class template and template parameters need to be provided.

We should improve the quality of the diagnostic for the y case - it should explain that x is a class template and template parameters are missing.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4