From: Anna Zaks Date: Mon, 7 May 2012 18:40:26 +0000 (+0000) Subject: [analyzer] Fixup for r155244: PurgeDeadSymbols should subclass StmtPoint X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51a31ca9a9903ecba1b25bc0989f62e1e2bebb4c;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156315 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 377f1bc256..e88d6faf94 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -40,13 +40,13 @@ public: BlockEntranceKind, BlockExitKind, PreStmtKind, + PreStmtPurgeDeadSymbolsKind, + PostStmtPurgeDeadSymbolsKind, PostStmtKind, PreLoadKind, PostLoadKind, PreStoreKind, PostStoreKind, - PostStmtPurgeDeadSymbolsKind, - PreStmtPurgeDeadSymbolsKind, PostConditionKind, PostLValueKind, PostInitializerKind, @@ -352,11 +352,11 @@ public: /// \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 @@ public: /// \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;