blob: 074afa9d173d521af996c7827740aa7f2ecf6b0b [file] [log] [blame]
Douglas Gregor2f2433f2009-05-18 21:08:14 +00001// RUN: clang-cc -fsyntax-only -std=c++0x -verify %s
2
3template<typename T> struct TryCatch0 {
4 void f() {
5 try {
6 } catch (T&&) { // expected-error 2{{cannot catch exceptions by rvalue reference}}
7 }
8 }
9};
10
11template struct TryCatch0<int&>; // okay
12template struct TryCatch0<int&&>; // expected-note{{instantiation}}
13template struct TryCatch0<int>; // expected-note{{instantiation}}
14