diff options
| author | Ted Kremenek <kremenek@apple.com> | 2011-05-25 23:57:29 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2011-05-25 23:57:29 +0000 |
| commit | 4c5d2888f46788f1970994e7607de33ca8c03a0e (patch) | |
| tree | b0a2fa1c0c80f5bfeb8772a7bbf838cd60ac7ad3 /clang/lib/StaticAnalyzer/Core/CFRefCount.cpp | |
| parent | c70355195cfffc79108eaa4a190095a3050b144a (diff) | |
| download | bcm5719-llvm-4c5d2888f46788f1970994e7607de33ca8c03a0e.tar.gz bcm5719-llvm-4c5d2888f46788f1970994e7607de33ca8c03a0e.zip | |
static analyzer: when conservatively evaluating functions, don't invalidate the values of globals when the called function is strlen.
llvm-svn: 132100
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CFRefCount.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/CFRefCount.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp index 59fea1031ff..013eeec0e4b 100644 --- a/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -2664,11 +2664,13 @@ void CFRefCount::evalSummary(ExplodedNodeSet& Dst, // NOTE: Even if RegionsToInvalidate is empty, we must still invalidate // global variables. // NOTE: RetainReleaseChecker handles the actual invalidation of symbols. - state = state->invalidateRegions(RegionsToInvalidate.data(), - RegionsToInvalidate.data() + - RegionsToInvalidate.size(), - Ex, Count, &IS, - /* invalidateGlobals = */ true); + state = + state->invalidateRegions(RegionsToInvalidate.data(), + RegionsToInvalidate.data() + + RegionsToInvalidate.size(), + Ex, Count, &IS, + /* invalidateGlobals = */ + Eng.doesInvalidateGlobals(callOrMsg)); // Evaluate the effect on the message receiver. if (!ErrorRange.isValid() && Receiver) { |

