blob: aa809e4bf949b5395bd1a4d4929e041073bff9a7 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -std=c++0x -verify %s
Douglas Gregor2f2433f2009-05-18 21:08:14 +00002
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