blob: 81dbbba1d00158a68af9e7786703d935bf4c9488 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// RUN: %clang_cc1 -fsyntax-only -Wundefined-internal -verify %s
void test1() {
struct S { virtual void f(); };
// expected-warning@-1{{function 'test1()::S::f' has internal linkage but is not defined}}
S s;
// expected-note@-1{{used here}}
}
void test2() {
struct S;
struct S { virtual void f(); };
// expected-warning@-1{{function 'test2()::S::f' has internal linkage but is not defined}}
S s;
// expected-note@-1{{used here}}
}
|