Anders Carlsson | e7c8cb6 | 2009-09-26 20:53:44 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s |
| 2 | |
| 3 | namespace std { |
| 4 | struct A { A(); }; |
| 5 | |
| 6 | // CHECK: define void @_ZNSt1AC1Ev |
| 7 | // CHECK: define void @_ZNSt1AC2Ev |
| 8 | A::A() { } |
| 9 | }; |
Anders Carlsson | 8c03155 | 2009-09-26 23:10:05 +0000 | [diff] [blame] | 10 | |
| 11 | namespace std { |
Anders Carlsson | 189d59c | 2009-09-26 23:14:39 +0000 | [diff] [blame^] | 12 | template<typename T> struct allocator { }; |
Anders Carlsson | 8c03155 | 2009-09-26 23:10:05 +0000 | [diff] [blame] | 13 | } |
| 14 | |
| 15 | // FIXME: typename is really not allowed here, but it's kept |
| 16 | // as a workaround for PR5061. |
| 17 | // CHECK: define void @_Z1fSaIcESaIiE |
| 18 | void f(typename std::allocator<char>, typename std::allocator<int>) { } |
Anders Carlsson | 189d59c | 2009-09-26 23:14:39 +0000 | [diff] [blame^] | 19 | |
| 20 | namespace std { |
| 21 | template<typename T> struct basic_string { }; |
| 22 | } |
| 23 | |
| 24 | // FIXME: typename is really not allowed here, but it's kept |
| 25 | // as a workaround for PR5061. |
| 26 | // CHECK: define void @_Z1fSbIcESbIiE |
| 27 | void f(typename std::basic_string<char>, typename std::basic_string<int>) { } |