summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-08-18 01:05:30 +0000
committerTed Kremenek <kremenek@apple.com>2009-08-18 01:05:30 +0000
commit9b2c79de593e6e8ef0e4761ad5e963c3fdab3509 (patch)
tree83fbd2a4d1af8ec7d8c5ba4dc9bac985db004a17 /clang/lib/Analysis/BugReporter.cpp
parent1105cbc2702e87179f0c1e6e9c3474024b6a0205 (diff)
downloadbcm5719-llvm-9b2c79de593e6e8ef0e4761ad5e963c3fdab3509.tar.gz
bcm5719-llvm-9b2c79de593e6e8ef0e4761ad5e963c3fdab3509.zip
Enhance static analyzer diagnostics by introducing a new 'EnhancedBugReporter'
which allows custom checks to register callback creator functions for creating BugReporterVisitor objects. This allows various checks to include diagnostics such as 'assuming value is null' with little extra work. Eventually this API should be refactored to be cleaner and more simple. llvm-svn: 79302
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index af4fd384e85..354bafd9896 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/lib/Analysis/BugReporter.cpp
@@ -41,8 +41,8 @@ BugReporterContext::~BugReporterContext() {
//===----------------------------------------------------------------------===//
static inline const Stmt* GetStmt(ProgramPoint P) {
- if (const PostStmt* PS = dyn_cast<PostStmt>(&P))
- return PS->getStmt();
+ if (const StmtPoint* SP = dyn_cast<StmtPoint>(&P))
+ return SP->getStmt();
else if (const BlockEdge* BE = dyn_cast<BlockEdge>(&P))
return BE->getSrc()->getTerminator();
OpenPOWER on IntegriCloud