blob: 9c8916e77bb0db3a2378f80ff3a31431b58b6024 [file] [log] [blame]
Akira Hatanaka43556c12016-11-03 15:04:58 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++14 %s
2
3#pragma clang diagnostic fatal "-Wall"
4#pragma clang diagnostic fatal "-Wold-style-cast"
5
6template <class T> bool foo0(const long long *a, T* b) {
7 return a == (const long long*)b; // expected-error {{use of old-style cast}}
8}
9
10template<class T>
11struct S1 {
12};
13
14template<class T>
15struct S2 : S1<T> {
16 bool m1(const long long *a, T *b) const { return foo0(a, b); }
17};
18
19bool foo1(const long long *a, int *b) {
20 S2<int> s2;
21 return s2.m1(a, b);
22}