summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-05-25 23:57:29 +0000
committerTed Kremenek <kremenek@apple.com>2011-05-25 23:57:29 +0000
commit4c5d2888f46788f1970994e7607de33ca8c03a0e (patch)
treeb0a2fa1c0c80f5bfeb8772a7bbf838cd60ac7ad3 /clang/lib/StaticAnalyzer/Core/CFRefCount.cpp
parentc70355195cfffc79108eaa4a190095a3050b144a (diff)
downloadbcm5719-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.cpp12
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) {
OpenPOWER on IntegriCloud