summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/constructor-init.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-01 21:19:15 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-01 21:19:15 +0000
commitdf9a41f3c1d1ca5aec6e2c17e38c29cff72b8726 (patch)
tree97029e3167dda3e16599d22504f8b15708b986a4 /test/CodeGenCXX/constructor-init.cpp
parentbcc3e660a1fdc19722157ef3e2f133418856ca3d (diff)
Fix testcase
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/constructor-init.cpp')
-rw-r--r--test/CodeGenCXX/constructor-init.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp
index f439083c07..a195afe069 100644
--- a/test/CodeGenCXX/constructor-init.cpp
+++ b/test/CodeGenCXX/constructor-init.cpp
@@ -113,6 +113,22 @@ namespace InitVTable {
B::B(int x) : A(x + 5) {}
}
+namespace rdar9694300 {
+ struct X {
+ int x;
+ };
+
+ // CHECK: define void @_ZN11rdar96943001fEv
+ void f() {
+ // CHECK: alloca
+ X x;
+ // CHECK-NEXT: [[I:%.*]] = alloca i32
+ // CHECK-NEXT: store i32 17, i32* [[I]]
+ int i = 17;
+ // CHECK-NEXT: ret void
+ }
+}
+
template<typename T>
struct X {
X(const X &);
@@ -133,19 +149,3 @@ template<typename T>
X<T>::X(const X &other) : start(0), end(0) { }
X<int> get_X(X<int> x) { return x; }
-
-namespace rdar9694300 {
- struct X {
- int x;
- };
-
- // CHECK: define void @_ZN11rdar96943001fEv
- void f() {
- // CHECK: alloca
- X x;
- // CHECK-NEXT: [[I:%.*]] = alloca i32
- // CHECK-NEXT: store i32 17, i32* [[I]]
- int i = 17;
- // CHECK-NEXT: ret void
- }
-}