]> granicus.if.org Git - clang/commit
[analyzer] Ensure that loop widening does not invalidate references
authorMatthew Voss <matthew.voss@sony.com>
Tue, 12 Jun 2018 22:22:35 +0000 (22:22 +0000)
committerMatthew Voss <matthew.voss@sony.com>
Tue, 12 Jun 2018 22:22:35 +0000 (22:22 +0000)
commite4b014451ae7dceacbfb5d0d4b4c8beb34f48158
tree4985b1c69468d7ecfb0e28685092623520de014b
parent08956eb168014e72aed6dff54dcdd5607a52aa5e
[analyzer] Ensure that loop widening does not invalidate references

Loop widening can invalidate a reference. If the analyzer attempts to visit the
destructor to a non-existent reference, it will crash. This patch ensures that
the reference is preserved.

https://reviews.llvm.org/D47044

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334554 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/LoopWidening.cpp
test/Analysis/loop-widening-preserve-reference-type.cpp [new file with mode: 0644]