1 // RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -std=c++11 -verify %s
3 template<typename T
> struct TryCatch0
{
6 } catch (T
&&) { // expected-error 2{{cannot catch exceptions by rvalue reference}}
11 template struct TryCatch0
<int&>; // okay
12 template struct TryCatch0
<int&&>; // expected-note{{instantiation}}
13 template struct TryCatch0
<int>; // expected-note{{instantiation}}
21 Exception(const Exception
&); // expected-note{{declared private here}}
25 } catch(Exception e
) { // expected-error{{calling a private constructor of class 'PR10232::Templated<int>::Exception'}}
30 template class Templated
<int>; // expected-note{{in instantiation of member function 'PR10232::Templated<int>::exception' requested here}}