[cfe-commits] r156315 - /cfe/trunk/include/clang/Analysis/ProgramPoint.h
Anna Zaks
ganna at apple.com
Mon May 7 11:40:26 PDT 2012
Author: zaks
Date: Mon May 7 13:40:26 2012
New Revision: 156315
URL: http://llvm.org/viewvc/llvm-project?rev=156315&view=rev
Log:
[analyzer] Fixup for r155244: PurgeDeadSymbols should subclass StmtPoint
To solve the inconsistency pointed out in Erik's review, refactor class
hierarchy of ProgramPoints so that PreStmtPurgeDeadSymbols and
PostStmtPurgeDeadSymbols both subclass from StmtPoint instead of
PostStmt.
Modified:
cfe/trunk/include/clang/Analysis/ProgramPoint.h
Modified: cfe/trunk/include/clang/Analysis/ProgramPoint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ProgramPoint.h?rev=156315&r1=156314&r2=156315&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/ProgramPoint.h (original)
+++ cfe/trunk/include/clang/Analysis/ProgramPoint.h Mon May 7 13:40:26 2012
@@ -40,13 +40,13 @@
BlockEntranceKind,
BlockExitKind,
PreStmtKind,
+ PreStmtPurgeDeadSymbolsKind,
+ PostStmtPurgeDeadSymbolsKind,
PostStmtKind,
PreLoadKind,
PostLoadKind,
PreStoreKind,
PostStoreKind,
- PostStmtPurgeDeadSymbolsKind,
- PreStmtPurgeDeadSymbolsKind,
PostConditionKind,
PostLValueKind,
PostInitializerKind,
@@ -352,11 +352,11 @@
/// \class Represents a point after we ran remove dead bindings BEFORE
/// processing the given statement.
-class PreStmtPurgeDeadSymbols : public PostStmt {
+class PreStmtPurgeDeadSymbols : public StmtPoint {
public:
PreStmtPurgeDeadSymbols(const Stmt *S, const LocationContext *L,
const ProgramPointTag *tag = 0)
- : PostStmt(S, PreStmtPurgeDeadSymbolsKind, L, tag) { }
+ : StmtPoint(S, 0, PreStmtPurgeDeadSymbolsKind, L, tag) { }
static bool classof(const ProgramPoint* Location) {
return Location->getKind() == PreStmtPurgeDeadSymbolsKind;
@@ -365,11 +365,11 @@
/// \class Represents a point after we ran remove dead bindings AFTER
/// processing the given statement.
-class PostStmtPurgeDeadSymbols : public PostStmt {
+class PostStmtPurgeDeadSymbols : public StmtPoint {
public:
PostStmtPurgeDeadSymbols(const Stmt *S, const LocationContext *L,
const ProgramPointTag *tag = 0)
- : PostStmt(S, PostStmtPurgeDeadSymbolsKind, L, tag) { }
+ : StmtPoint(S, 0, PostStmtPurgeDeadSymbolsKind, L, tag) { }
static bool classof(const ProgramPoint* Location) {
return Location->getKind() == PostStmtPurgeDeadSymbolsKind;
More information about the cfe-commits
mailing list