aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/default-constructor-default-argument.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-18 14:59:57 +0000
commitb3d5a323a5ca92ea73443499cee2f15db1ff0fb3 (patch)
tree60a1694bec5a44d15456acc880cb2f91619f66aa /test/CodeGenCXX/default-constructor-default-argument.cpp
parent8f57cb0305232cb53fff00ef151ca716766f3437 (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/default-constructor-default-argument.cpp')
-rw-r--r--test/CodeGenCXX/default-constructor-default-argument.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCXX/default-constructor-default-argument.cpp b/test/CodeGenCXX/default-constructor-default-argument.cpp
new file mode 100644
index 000000000000..f53732e471fe
--- /dev/null
+++ b/test/CodeGenCXX/default-constructor-default-argument.cpp
@@ -0,0 +1,8 @@
+// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s
+
+// Check that call to constructor for struct A is generated correctly.
+struct A { A(int x = 2); };
+struct B : public A {};
+B x;
+
+// CHECK: call void @_ZN1AC1Ei