[cfe-commits] r152868 - /cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
Jordy Rose
jediknil at belkadan.com
Thu Mar 15 15:45:30 PDT 2012
Author: jrose
Date: Thu Mar 15 17:45:29 2012
New Revision: 152868
URL: http://llvm.org/viewvc/llvm-project?rev=152868&view=rev
Log:
[analyzer] If a metadata symbol is interesting, its region is interesting as well.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=152868&r1=152867&r2=152868&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Thu Mar 15 17:45:29 2012
@@ -1255,6 +1255,9 @@
if (!sym)
return;
interestingSymbols.insert(sym);
+
+ if (const SymbolMetadata *meta = dyn_cast<SymbolMetadata>(sym))
+ interestingRegions.insert(meta->getRegion());
}
void BugReport::markInteresting(const MemRegion *R) {
@@ -1262,7 +1265,7 @@
return;
R = R->getBaseRegion();
interestingRegions.insert(R);
-
+
if (const SymbolicRegion *SR = dyn_cast<SymbolicRegion>(R))
interestingSymbols.insert(SR->getSymbol());
}
@@ -1279,6 +1282,8 @@
bool BugReport::isInteresting(SymbolRef sym) const {
if (!sym)
return false;
+ // We don't currently consider metadata symbols to be interesting
+ // even if we know their region is interesting. Is that correct behavior?
return interestingSymbols.count(sym);
}
More information about the cfe-commits
mailing list