Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / overloaded-functions.cpp
blob26565753dd73559069c0f7d138f820783a0172e3
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 namespace {
4 template <bool, typename>
5 void Foo() {}
7 template <int size>
8 void Foo() {
9 int arr[size];
10 // expected-error@-1 {{'arr' declared as an array with a negative size}}
14 void test_foo() {
15 Foo<-1>();
16 // expected-note@-1 {{in instantiation of function template specialization '(anonymous namespace)::Foo<-1>' requested here}}
19 template <bool, typename>
20 void Bar() {}
22 template <int size>
23 void Bar() {
24 int arr[size];
25 // expected-error@-1 {{'arr' declared as an array with a negative size}}
28 void test_bar() {
29 Bar<-1>();
30 // expected-note@-1 {{in instantiation of function template specialization 'Bar<-1>' requested here}}