a map keyed off the canonical declaration. Don't try to set it if we're loading
some non-canonical merged declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230716
91177308-0d34-0410-b5e6-
96231b3b80d8
VisitCXXMethodDecl(D);
if (auto *CD = ReadDeclAs<CXXConstructorDecl>(Record, Idx))
- D->setInheritedConstructor(CD);
+ if (D->isCanonicalDecl())
+ D->setInheritedConstructor(CD);
D->IsExplicitSpecified = Record[Idx++];
// FIXME: We should defer loading this until we need the constructor's body.
std::tie(D->CtorInitializers, D->NumCtorInitializers) =
namespace Aliased { extern int a; }
namespace Alias = Aliased;
+
+struct InhCtorA { InhCtorA(int); };
+struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; };
namespace Aliased { extern int b; }
namespace Alias = Aliased;
+
+struct InhCtorA { InhCtorA(int); };
+struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; };
void use_extern_c_function_2() { ExternCFunction(); }
+InhCtorB inhctorb(2);
+
// CHECK: VarDecl [[mergeUsedFlag:0x[0-9a-f]*]] {{.*}} in cxx_decls.imported used mergeUsedFlag
// CHECK: VarDecl {{0x[0-9a-f]*}} prev [[mergeUsedFlag]] {{.*}} in cxx_decls_merged used mergeUsedFlag