diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-01-12 22:21:33 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-01-12 22:21:33 +0000 |
commit | d1036128aba213359dc6756cac5c49231a0483ce (patch) | |
tree | fbfe98c9bd86089eae193c44397b950db932d28c /clang/test/CodeGenCXX | |
parent | 212f3b91ee170d7ab3efb0a2dc23e763fd6aab66 (diff) | |
download | bcm5719-llvm-d1036128aba213359dc6756cac5c49231a0483ce.tar.gz bcm5719-llvm-d1036128aba213359dc6756cac5c49231a0483ce.zip |
When rebuilding an InitListExpr, don't give it a type.
InitListExprs without types (well, with type 'void') represent not-yet-analyzed
initializer lists; InitListExpr with types fool Sema into thinking they don't
need further analysis in some cases (particularly C++17 copy omission).
llvm-svn: 322414
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r-- | clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp b/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp index 9110e49f93a..f59ec51136f 100644 --- a/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp +++ b/clang/test/CodeGenCXX/cxx1z-initializer-aggregate.cpp @@ -112,3 +112,21 @@ namespace Dynamic { // A_CLEANUP: // CHECK: call void @_ZN7Dynamic1AD1Ev({{.*}} @_ZN7Dynamic2d3E } + +namespace Instantiated1 { + struct A { A(); }; + struct B : A { using A::A; }; + template<int> B v({}); + template B v<0>; + // CHECK-LABEL: define {{.*}}global_var_init{{.*}} comdat($_ZN13Instantiated11vILi0EEE) { + // CHECK: call void @_ZN13Instantiated11BC1Ev(%{{.*}}* @_ZN13Instantiated11vILi0EEE) +} + +namespace Instantiated2 { + struct A { A(); }; + struct B : A {}; + template<int> B v({}); + template B v<0>; + // CHECK-LABEL: define {{.*}}global_var_init{{.*}} comdat($_ZN13Instantiated21vILi0EEE) { + // CHECK: call void @_ZN13Instantiated21AC2Ev( +} |