Mercurial > hg > CbC > CbC_llvm
annotate clang/test/SemaTemplate/instantiate-default-assignment-operator.cpp @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 template<typename> struct PassRefPtr { }; | |
3 template<typename T> struct RefPtr { | |
4 RefPtr& operator=(const RefPtr&) { int a[sizeof(T) ? -1 : -1];} // expected-error 2 {{array with a negative size}} | |
5 RefPtr& operator=(const PassRefPtr<T>&); | |
6 }; | |
7 | |
8 struct A { RefPtr<int> a; }; // expected-note {{instantiation of member function 'RefPtr<int>::operator=' requested here}} | |
9 struct B : RefPtr<float> { }; // expected-note {{in instantiation of member function 'RefPtr<float>::operator=' requested here}} | |
10 | |
11 void f() { | |
12 A a1, a2; | |
13 a1 = a2; | |
14 | |
15 B b1, b2; | |
16 b1 = b2; | |
17 } |