]> granicus.if.org Git - clang/commitdiff
Add code generation test for r86500.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 9 Nov 2009 18:49:09 +0000 (18:49 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 9 Nov 2009 18:49:09 +0000 (18:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86574 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/default-constructor-default-argument.cpp [new file with mode: 0644]

diff --git a/test/CodeGenCXX/default-constructor-default-argument.cpp b/test/CodeGenCXX/default-constructor-default-argument.cpp
new file mode 100644 (file)
index 0000000..f53732e
--- /dev/null
@@ -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