1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 class SmallVectorImpl
{
6 explicit SmallVectorImpl(unsigned N
) {
13 template <typename T
, unsigned N
>
14 class SmallVector
: public SmallVectorImpl
<T
> {
15 typedef typename SmallVectorImpl
<T
>::U U
; // expected-error {{no type named 'U' in 'SmallVectorImpl<CallSite>'}}
18 MinUs
= (static_cast<unsigned int>(sizeof(T
))*N
+ // expected-error {{invalid application of 'sizeof' to an incomplete type 'CallSite'}}
19 static_cast<unsigned int>(sizeof(U
)) - 1) /
20 static_cast<unsigned int>(sizeof(U
)),
21 NumInlineEltsElts
= MinUs
23 U InlineElts
[NumInlineEltsElts
];
25 SmallVector() : SmallVectorImpl
<T
>(NumInlineEltsElts
) {
30 class CallSite
; // expected-note {{forward declaration of 'CallSite'}}
31 class InlineFunctionInfo
{
33 explicit InlineFunctionInfo() {}
34 SmallVector
<CallSite
, 2> DevirtualizedCalls
; // expected-note {{in instantiation of template class 'SmallVector<CallSite, 2>' requested}}