diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-25 01:06:23 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-25 01:06:23 +0000 |
commit | 3682f1ea9c7fddc7dcbc590891158ba40f7fca16 (patch) | |
tree | bbf81b3e0a318f84b785dbb77ac63ea7bc382f40 /lib/Frontend/InitPreprocessor.cpp | |
parent | 3f9411a31a5d56757271e150400458491195da0b (diff) |
[analyzer] Use the common evalBind infrastructure for initializers.
This allows checkers (like the MallocChecker) to process the effects of the
bind. Previously, using a memory-allocating function (like strdup()) in an
initializer would result in a leak warning.
This does bend the expectations of checkBind a bit; since there is no
assignment expression, the statement being used is the initializer value.
In most cases this shouldn't matter because we'll use a PostInitializer
program point (rather than PostStmt) for any checker-generated nodes, though
we /will/ generate a PostStore node referencing the internal statement.
(In theory this could have funny effects if someone actually does an
assignment within an initializer; in practice, that seems like it would be
very rare.)
<rdar://problem/12171711>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions