22 lines · cpp
1// RUN: %clang_cc1 -std=c++20 -verify -emit-llvm-only %s2 3template <int>4void Create(const void* = nullptr);5 6template <int>7struct ObjImpl {8 template <int>9 friend void ::Create(const void*);10};11 12template <int I>13void Create(const void*) {14 (void) ObjImpl<I>{};15}16 17int main() {18 Create<42>();19}20 21// expected-no-diagnostics22