[LifetimeAnalysis] Support std::stack::top() and std::optional::value()
authorMatthias Gehre <M.Gehre@gmx.de>
Wed, 14 Aug 2019 21:55:57 +0000 (21:55 +0000)
committerMatthias Gehre <M.Gehre@gmx.de>
Wed, 14 Aug 2019 21:55:57 +0000 (21:55 +0000)
commit1bebc22bd94d44214bbd8a2dad10736c7c5e205b
treecd8efa570ec89f3a5680df4fd20bcc92b2586e09
parent4395b31d99577a0e753403426bca761482a58a52
[LifetimeAnalysis] Support std::stack::top() and std::optional::value()

Summary: Diagnose dangling pointers that come from std::stack::top() and std::optional::value().

Reviewers: gribozavr

Subscribers: cfe-commits, xazax.hun

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66164

llvm-svn: 368929
clang/lib/Sema/SemaInit.cpp
clang/test/Sema/warn-lifetime-analysis-nocfg.cpp