aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorShuai Wang <shuaiwang@google.com>2018-09-11 17:33:12 +0000
committerShuai Wang <shuaiwang@google.com>2018-09-11 17:33:12 +0000
commitea85b52732827eb41913a1cd60ae66b56e99de82 (patch)
treee8194ea63bd5467b25dab569aca01a721bdc9a9c /llvm/lib/CodeGen/MachineInstr.cpp
parentaca532f14dd3360d0025e0b9d5ae606be046cf79 (diff)
downloadllvm-ea85b52732827eb41913a1cd60ae66b56e99de82.zip
llvm-ea85b52732827eb41913a1cd60ae66b56e99de82.tar.gz
llvm-ea85b52732827eb41913a1cd60ae66b56e99de82.tar.bz2
[clang-tidy] Handle unique owning smart pointers in ExprMutationAnalyzer
Summary: For smart pointers like std::unique_ptr which uniquely owns the underlying object, treat the mutation of the pointee as mutation of the smart pointer itself. This gives better behavior for cases like this: ``` void f(std::vector<std::unique_ptr<Foo>> v) { // undesirable analyze result of `v` as not mutated. for (auto& p : v) { p->mutate(); // only const member function `operator->` is invoked on `p` } } ``` Reviewers: hokein, george.karpenkov Subscribers: xazax.hun, a.sidorin, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D50883 llvm-svn: 341967
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions