]> granicus.if.org Git - clang/commitdiff
[analyzer] Assert that StmtPoint should be created with a non-null Stmt.
authorAnna Zaks <ganna@apple.com>
Thu, 6 Sep 2012 23:30:29 +0000 (23:30 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 6 Sep 2012 23:30:29 +0000 (23:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163358 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/ProgramPoint.h

index e66022c876d0f323b473a22f99def8926a456ebb..081c29fa26731ada72da0e0c508d4e8e8c6326e0 100644 (file)
@@ -213,7 +213,9 @@ class StmtPoint : public ProgramPoint {
 public:
   StmtPoint(const Stmt *S, const void *p2, Kind k, const LocationContext *L,
             const ProgramPointTag *tag)
-    : ProgramPoint(S, p2, k, L, tag) {}
+    : ProgramPoint(S, p2, k, L, tag) {
+    assert(S);
+  }
 
   const Stmt *getStmt() const { return (const Stmt*) getData1(); }