Erich Keane 0d18815baf Fix GH57943: Friend constraint checker didn't handle null decls.
Apparently TransformDecl in TreeTransform can be called with a nullptr
for a Decl, so my casts were illegal.  The fix here is to add an early
exit to my TransformDecl.
2022-09-23 12:21:56 -07:00

8 lines
175 B
C++

// RUN: %clang_cc1 -std=c++20 -verify %s
// expected-no-diagnostics
struct s {
template<typename T>
requires requires(T x) { x.g(); }
friend void f(T);
};