diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-02-27 01:57:00 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-02-27 01:57:00 +0000 |
| commit | f81c2cc6ca4b728522e2d6755bfc3968167aff11 (patch) | |
| tree | 22ed8ee64826f7c4f843cb3cee030d9b369f28e5 /clang/test/Modules | |
| parent | 84d28de62707263fb926449227929525817f536c (diff) | |
| download | bcm5719-llvm-f81c2cc6ca4b728522e2d6755bfc3968167aff11.tar.gz bcm5719-llvm-f81c2cc6ca4b728522e2d6755bfc3968167aff11.zip | |
[modules] For an inheriting constructor, the inherited constructor is stored in
a map keyed off the canonical declaration. Don't try to set it if we're loading
some non-canonical merged declaration.
llvm-svn: 230716
Diffstat (limited to 'clang/test/Modules')
| -rw-r--r-- | clang/test/Modules/Inputs/cxx-decls-imported.h | 3 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/cxx-decls-merged.h | 3 | ||||
| -rw-r--r-- | clang/test/Modules/cxx-decls.cpp | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/cxx-decls-imported.h b/clang/test/Modules/Inputs/cxx-decls-imported.h index 8c1e74f17c3..a4910fee753 100644 --- a/clang/test/Modules/Inputs/cxx-decls-imported.h +++ b/clang/test/Modules/Inputs/cxx-decls-imported.h @@ -47,3 +47,6 @@ typedef decltype(name_for_linkage2_inner_a) NameForLinkage2Inner; namespace Aliased { extern int a; } namespace Alias = Aliased; + +struct InhCtorA { InhCtorA(int); }; +struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; }; diff --git a/clang/test/Modules/Inputs/cxx-decls-merged.h b/clang/test/Modules/Inputs/cxx-decls-merged.h index 86e81a9bb68..5eefb44992f 100644 --- a/clang/test/Modules/Inputs/cxx-decls-merged.h +++ b/clang/test/Modules/Inputs/cxx-decls-merged.h @@ -25,3 +25,6 @@ typedef decltype(name_for_linkage2_inner_b) NameForLinkage2Inner; namespace Aliased { extern int b; } namespace Alias = Aliased; + +struct InhCtorA { InhCtorA(int); }; +struct InhCtorB : InhCtorA { using InhCtorA::InhCtorA; }; diff --git a/clang/test/Modules/cxx-decls.cpp b/clang/test/Modules/cxx-decls.cpp index 109306ed79d..4064040c125 100644 --- a/clang/test/Modules/cxx-decls.cpp +++ b/clang/test/Modules/cxx-decls.cpp @@ -52,5 +52,7 @@ int use_namespace_alias() { return Alias::a + Alias::b; } 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 |

