diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-04-09 22:50:07 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-04-09 22:50:07 +0000 |
| commit | f3e67de85aed2c3582755845d39474948c0cc63a (patch) | |
| tree | 8992c1ad8c7ab7a30f323757812ab9275e97e52f /clang/test | |
| parent | 8f9a3f2d7eb7cdcea9e8e3eb7a4766397443b68e (diff) | |
| download | bcm5719-llvm-f3e67de85aed2c3582755845d39474948c0cc63a.tar.gz bcm5719-llvm-f3e67de85aed2c3582755845d39474948c0cc63a.zip | |
[CodeGen] Do a more principled fix for PR231653, always use the inner type.
We were still using the MaterializeTemporaryExpr's type to check if the
transform is legal. Always use the inner Expr type.
llvm-svn: 234543
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/cxx0x-initializer-references.cpp | 15 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp index bdc97b5bd50..318c8ea0d77 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-references.cpp @@ -1,7 +1,5 @@ // RUN: %clang_cc1 -std=c++11 -S -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s -// CHECK: private constant { i8** } { i8** getelementptr inbounds ([3 x i8*], [3 x i8*]* @_ZTVN7PR2316510ChildClassE, i64 0, i64 2) }, align 4 - namespace reference { struct A { int i1, i2; @@ -96,7 +94,18 @@ void helper(const AbstractClass ¶m) { } void foo() { -// CHECK: call void @_ZN7PR231656helperERKNS_13AbstractClassE(%{{.*}} bitcast ({ i8** }* @{{.*}} to %{{.*}}*)) +// CHECK-LABEL: @_ZN7PR231653fooEv +// CHECK: call {{.*}} @_ZN7PR2316510ChildClassC1Ev +// CHECK: call void @_ZN7PR231656helperERKNS_13AbstractClassE helper(ChildClass()); } + +struct S { struct T { int a; } t; mutable int b; }; +void f() { +// CHECK-LABEL: _ZN7PR231651fEv +// CHECK: alloca +// CHECK: alloca +// CHECK: store + const S::T &r = S().t; +} } diff --git a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp index 1131ca9fa31..6d5d3971bd7 100644 --- a/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp +++ b/clang/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp @@ -510,7 +510,7 @@ namespace B19773010 { void PR22940_helper(const pair<void*, int>&) { } void PR22940() { // CHECK-LABEL: @_ZN9B197730107PR22940Ev - // CHECK-NOT: call {{.*}} @_ZN9B197730104pairIPviEC{{.}}Ev( + // CHECK: call {{.*}} @_ZN9B197730104pairIPviEC{{.}}Ev( // CHECK: call {{.*}} @_ZN9B1977301014PR22940_helperERKNS_4pairIPviEE( PR22940_helper(pair<void*, int>()); } |

