blob: db13624d44267d0145f1d4badc2f709d808da494 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
template<typename T>
struct S {
S() { }
};
template<typename T>
struct vector {
void push_back(const T&) { int a[sizeof(T) ? -1: -1]; } // expected-error {{array size is negative}}
};
class GRExprEngine {
public:
typedef vector<S<void *> >CheckersOrdered;
CheckersOrdered Checkers;
template <typename CHECKER>
void registerCheck(CHECKER *check) {
Checkers.push_back(S<void *>()); // expected-note {{in instantiation of member function 'vector<struct S<void *> >::push_back' requested here}}
}
};
class RetainReleaseChecker { };
void f(GRExprEngine& Eng) {
Eng.registerCheck(new RetainReleaseChecker); // expected-note {{in instantiation of function template specialization 'GRExprEngine::registerCheck<class RetainReleaseChecker>' requested here}}
}
|