Skip to content
Commit db6ca05a authored by Artem Dergachev's avatar Artem Dergachev
Browse files

[analyzer] NFC: RetainCount: Protect from dumping raw region to path notes.

MemRegion::getString() is a wrapper around MemRegion::dump(), which is not
user-friendly and should never be used for diagnostic messages.

Actual cases where raw dumps were reaching the user were unintentionally fixed
in r315736; these were noticed accidentally and shouldn't be reproducible
anymore. For now RetainCountChecker only tracks pointers through variable
regions, and for those dumps are "fine". However, we should still use a less
dangerous method for producing our path notes.

This patch replaces the dump with printing a variable name, asserting that this
is indeed a variable.

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

llvm-svn: 322799
parent b60a80a3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment