[cfe-commits] r163358 - /cfe/trunk/include/clang/Analysis/ProgramPoint.h

Anna Zaks ganna at apple.com
Thu Sep 6 16:30:29 PDT 2012


Author: zaks
Date: Thu Sep  6 18:30:29 2012
New Revision: 163358

URL: http://llvm.org/viewvc/llvm-project?rev=163358&view=rev
Log:
[analyzer] Assert that StmtPoint should be created with a non-null Stmt.

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=163358&r1=163357&r2=163358&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/ProgramPoint.h (original)
+++ cfe/trunk/include/clang/Analysis/ProgramPoint.h Thu Sep  6 18:30:29 2012
@@ -213,7 +213,9 @@
 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(); }
 





More information about the cfe-commits mailing list