[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / test / SemaCXX / template-specialization.cpp
blob7b26ff9f5c5ba4982dfce2e9b52cbb6ff710d8d2
1 // RUN: %clang_cc1 -verify -fsyntax-only %s
2 // Verify the absence of assertion failures when solving calls to unresolved
3 // template member functions.
5 struct A {
6 template <typename T>
7 static void bar(int) { } // expected-note {{candidate template ignored: couldn't infer template argument 'T'}}
8 };
10 struct B {
11 template <int i>
12 static void foo() {
13 int array[i];
14 A::template bar(array[0]); // expected-error {{no matching function for call to 'bar'}}
18 int main() {
19 B::foo<4>(); // expected-note {{in instantiation of function template specialization 'B::foo<4>'}}
20 return 0;
23 namespace GH70375 {
25 template <typename Ty>
26 struct S {
27 static void bar() {
28 Ty t;
29 t.foo();
32 static void take(Ty&) {}
35 template <typename P>
36 struct Outer {
37 template <typename C>
38 struct Inner;
40 using U = S<Inner<P>>;
42 template <>
43 struct Inner<void> {
44 void foo() {
45 U::take(*this);
50 void instantiate() {
51 Outer<void>::U::bar();