Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp =================================================================== --- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -7306,9 +7306,6 @@ clang::CXXDestructorDecl *cxx_dtor_decl(nullptr); clang::CXXConstructorDecl *cxx_ctor_decl(nullptr); - if (is_artificial) - return nullptr; // skip everything artificial - const clang::ExplicitSpecifier explicit_spec( nullptr /*expr*/, is_explicit ? clang::ExplicitSpecKind::ResolvedTrue : clang::ExplicitSpecKind::ResolvedFalse); Index: lldb/test/API/lang/cpp/constructors/TestCppConstructors.py =================================================================== --- lldb/test/API/lang/cpp/constructors/TestCppConstructors.py +++ lldb/test/API/lang/cpp/constructors/TestCppConstructors.py @@ -18,6 +18,9 @@ self.expect_expr("ClassWithDeletedCtor().value", result_type="int", result_value="6") self.expect_expr("ClassWithDeletedDefaultCtor(7).value", result_type="int", result_value="7") + self.expect_expr("ClassWithImplicitCtor a{}; a.x", result_type="int", result_value="10") + self.expect_expr("ClassWithImplicitCtor a{}; flag", result_type="int", result_value="100") + # FIXME: It seems we try to call the non-existent default constructor here which is wrong. self.expect("expr ClassWithDefaultedCtor().foo()", error=True, substrs="Couldn't lookup symbols:") Index: lldb/test/API/lang/cpp/constructors/main.cpp =================================================================== --- lldb/test/API/lang/cpp/constructors/main.cpp +++ lldb/test/API/lang/cpp/constructors/main.cpp @@ -1,5 +1,14 @@ +int flag=0; + +struct ClassForSideEffect { + ClassForSideEffect() { flag=1; } + ClassForSideEffect(int x) { flag=x; } +}; + struct ClassWithImplicitCtor { int foo() { return 1; } + int x=10; + ClassForSideEffect cse = ClassForSideEffect(100); }; struct ClassWithDefaultedCtor {