[clang] NFC: Add test case for #178324 and mark it as fixed (#190490)

Issue #178324 was actually fixed by #187755

We lost the "declaration does not declare anything" warning since the
regression was introduced, but that was because:
1) Since #78436 we treat __builtin_FUNCSIG in a dependent context
effectivelly as if it contained a template parameter.
2) Our decltype implementation treats eexpressions containing template
parameters as if they were completely opaque (but alas this goes against
the spec, which says in [temp.type]p4 this should be looking only at
type dependence).
3) Since the decltype is opaque, we don't know what lookup will find, so
we can't issue the warning because we don't know if we are going to end
up with a type or an expression.

Fixes #178324
This commit is contained in:
Matheus Izvekov 2026-04-04 19:10:29 -03:00 committed by GitHub
parent d400080063
commit 7fd02b32f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1081,3 +1081,13 @@ static_assert(X{}.
static_assert(X{}.
foo() == 10001);
}
#ifdef MS
namespace GH178324 {
struct a {
using e = int;
};
void current(const char * = __builtin_FUNCSIG());
template <class> void c() { decltype(a(current()))::e; }
} // namespace GH178324
#endif