From d49c7b61d9d5682565524e845bd8d0dc90294e45 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 9 Nov 2009 18:49:09 +0000 Subject: [PATCH] Add code generation test for r86500. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86574 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGenCXX/default-constructor-default-argument.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/CodeGenCXX/default-constructor-default-argument.cpp diff --git a/test/CodeGenCXX/default-constructor-default-argument.cpp b/test/CodeGenCXX/default-constructor-default-argument.cpp new file mode 100644 index 0000000000..f53732e471 --- /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 -- 2.40.0