Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaCXX / template-specialization.cpp
blobae7bc332fccee1daec5a2df48331bc628f1ee58c
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;