2 Commits

Author SHA1 Message Date
Chuanqi Xu
1b6c1a3bd7 [NFC] Improve test for clang/test/Modules/GH77953.cpp
Generally we'll use `-fsyntax-only` when it is sufficient and we'll use
`expected-no-diagnostics` to test the behavior doesn't trigger any
problems. This patch applies these two improvements to
`clang/test/Modules/GH77953.cpp`.
2024-01-16 11:32:10 +08:00
cor3ntin
c58bc24fcf
[Clang] Only compare template params of potential overload after checking their decl context (#78139)
Fixes a regression from 69066ab3 in which we compared the template lists
of potential overloads before checkings their declaration contexts.

This would cause a crash when doing constraint substitution as part of
that template check, because we would try to refer to not yet
instantiated entities (the underlying cause is unclear).

This patch reorders (again) when we look at template parameter so we
don't do it when checkings friends in different lexical contexts.

Fixes #77953
Fixes #78101
2024-01-16 00:56:42 +01:00