Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm-only -std=c++11 -g %s |
Anders Carlsson | ebc3279 | 2011-03-06 16:43:04 +0000 | [diff] [blame] | 2 | |
| 3 | namespace PR9414 { |
| 4 | int f() { |
| 5 | auto x = 0; |
| 6 | return x; |
| 7 | } |
| 8 | } |
Richard Smith | 7657fd7 | 2012-08-13 21:29:18 +0000 | [diff] [blame] | 9 | |
| 10 | // Don't crash. |
| 11 | namespace PR13570 { |
| 12 | template<typename T, typename U> struct P {}; |
| 13 | template<typename T> struct A { |
| 14 | template<typename U> static P<T,U> isa(U); |
| 15 | decltype(isa(int())) f() {} |
| 16 | }; |
| 17 | template struct A<int>; |
| 18 | } |