Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s |
Richard Smith | e653ba2 | 2012-02-26 00:31:33 +0000 | [diff] [blame] | 2 | struct A { A(); }; |
Sean Hunt | eb88ae5 | 2011-05-23 21:07:59 +0000 | [diff] [blame] | 3 | template<typename T> |
Richard Smith | e653ba2 | 2012-02-26 00:31:33 +0000 | [diff] [blame] | 4 | struct X : A // default constructor is not trivial |
Sean Hunt | eb88ae5 | 2011-05-23 21:07:59 +0000 | [diff] [blame] | 5 | { |
| 6 | X() = default; |
Richard Smith | 2d6a567 | 2012-01-14 04:30:29 +0000 | [diff] [blame] | 7 | ~X() {} // not a literal type |
Sean Hunt | eb88ae5 | 2011-05-23 21:07:59 +0000 | [diff] [blame] | 8 | }; |
| 9 | |
| 10 | X<int> x; |
| 11 | // CHECK: define internal void @__cxx_global_var_init() |
Eli Friedman | 12e9f8e | 2011-06-14 21:20:53 +0000 | [diff] [blame] | 12 | // CHECK: call {{.*}} @_ZN1XIiEC1Ev |
| 13 | // CHECK: define linkonce_odr {{.*}} @_ZN1XIiEC1Ev |
| 14 | // CHECK: define linkonce_odr {{.*}} @_ZN1XIiEC2Ev |