aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/BugReporter
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-02-24 07:20:53 +0000
committerTed Kremenek <kremenek@apple.com>2013-02-24 07:20:53 +0000
commit0dd15d78fb0c99faa5df724139ba4c16a9a345c6 (patch)
treeb2c2e938776913263a1fd631f8ffa21db0ff594b /include/clang/StaticAnalyzer/Core/BugReporter
parent026cd1a273d16eaa9a66be92f38b1f907202e542 (diff)
Add "KnownSVal" to represent SVals that cannot be UnknownSVal.
This provides a few sundry cleanups, and allows us to provide a compile-time check for a case that was a runtime assertion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/BugReporter')
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
index 75bf9613e2..bef4b30a35 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
@@ -99,7 +99,7 @@ class FindLastStoreBRVisitor
{
const MemRegion *R;
SVal V;
- bool satisfied;
+ bool Satisfied;
public:
/// \brief Convenience method to create a visitor given only the MemRegion.
@@ -112,13 +112,10 @@ public:
/// the BugReport.
static void registerStatementVarDecls(BugReport &BR, const Stmt *S);
- FindLastStoreBRVisitor(SVal v, const MemRegion *r)
- : R(r), V(v), satisfied(false) {
- assert (!V.isUnknown() && "Cannot track unknown value.");
-
- // TODO: Does it make sense to allow undef values here?
- // (If not, also see UndefCapturedBlockVarChecker)?
- }
+ FindLastStoreBRVisitor(KnownSVal V, const MemRegion *R)
+ : R(R),
+ V(V),
+ Satisfied(false) {}
void Profile(llvm::FoldingSetNodeID &ID) const;