diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:02:28 +0000 |
| commit | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch) | |
| tree | c72b9241553fc9966179aba84f90f17bfa9235c3 /test/SemaCXX/template-specialization.cpp | |
| parent | b52119637f743680a99710ce5fdb6646da2772af (diff) | |
Notes
Diffstat (limited to 'test/SemaCXX/template-specialization.cpp')
| -rw-r--r-- | test/SemaCXX/template-specialization.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/SemaCXX/template-specialization.cpp b/test/SemaCXX/template-specialization.cpp new file mode 100644 index 000000000000..ae7bc332fcce --- /dev/null +++ b/test/SemaCXX/template-specialization.cpp @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s +// Verify the absence of assertion failures when solving calls to unresolved +// template member functions. + +struct A { + template <typename T> + static void bar(int) { } // expected-note {{candidate template ignored: couldn't infer template argument 'T'}} +}; + +struct B { + template <int i> + static void foo() { + int array[i]; + A::template bar(array[0]); // expected-error {{no matching function for call to 'bar'}} + } +}; + +int main() { + B::foo<4>(); // expected-note {{in instantiation of function template specialization 'B::foo<4>'}} + return 0; +} |
