diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-06-28 00:11:42 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-06-28 00:11:42 +0000 |
commit | 4fb586c3494c7c9d35a77d06f4e95b059dea13ba (patch) | |
tree | ac2e4573a14b11c83659bab9c8ec5414600205c2 /clang/test/Analysis/temporaries-callback-order.cpp | |
parent | ff267df0de9664fa9af06987d455ae5f02425c3f (diff) | |
download | bcm5719-llvm-4fb586c3494c7c9d35a77d06f4e95b059dea13ba.tar.gz bcm5719-llvm-4fb586c3494c7c9d35a77d06f4e95b059dea13ba.zip |
[analyzer] Re-enable lifetime extension for temporaries without destructors.
When an object's class provides no destructor, it's less important to
materialize that object properly because we don't have to model the destructor
correctly, so previously we skipped the support for these syntax patterns.
Additionally, fix support for construction contexts of "static temporaries"
(temporaries that are lifetime-extended by static references) because
it turned out that we only had tests for them without destructors, which caused
us to regress when we re-introduced the construction context for such
temporaries.
Differential Revision: https://reviews.llvm.org/D47658
llvm-svn: 335796
Diffstat (limited to 'clang/test/Analysis/temporaries-callback-order.cpp')
-rw-r--r-- | clang/test/Analysis/temporaries-callback-order.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/test/Analysis/temporaries-callback-order.cpp b/clang/test/Analysis/temporaries-callback-order.cpp index df916cc4e76..120fabc1047 100644 --- a/clang/test/Analysis/temporaries-callback-order.cpp +++ b/clang/test/Analysis/temporaries-callback-order.cpp @@ -8,11 +8,7 @@ struct Sub : Super { }; void testTemporaries() { - // This triggers RegionChanges twice: - // - Once for zero-initialization of the structure. - // - Once for creating a temporary region and copying the structure there. - // FIXME: This code shouldn't really produce the extra temporary, however - // that's how we behave for now. + // This triggers RegionChanges once for zero-initialization of the structure. Sub().m(); } @@ -29,7 +25,6 @@ void seeIfCheckBindWorks() { // testTemporaries(): // CHECK-NEXT: RegionChanges -// CHECK-NEXT: RegionChanges // Make sure there's no further output. // CHECK-NOT: Bind |