blob: ae7bc332fccee1daec5a2df48331bc628f1ee58c [file] [log] [blame]
Rafael Espindola02e221b2012-08-28 04:13:54 +00001// RUN: %clang_cc1 -verify -fsyntax-only %s
2// Verify the absence of assertion failures when solving calls to unresolved
3// template member functions.
4
5struct A {
6 template <typename T>
7 static void bar(int) { } // expected-note {{candidate template ignored: couldn't infer template argument 'T'}}
8};
9
10struct 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'}}
15 }
16};
17
18int main() {
19 B::foo<4>(); // expected-note {{in instantiation of function template specialization 'B::foo<4>'}}
20 return 0;
21}