diff options
Diffstat (limited to 'test/CodeGenCXX/default-constructor-default-argument.cpp')
-rw-r--r-- | test/CodeGenCXX/default-constructor-default-argument.cpp | 8 |
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 0000000..f53732e --- /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 |