Fix semingly random failing assertions in DefUsesCalculator
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 27 Jun 2013 09:49:50 +0000 (11:49 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 27 Jun 2013 09:50:43 +0000 (11:50 +0200)
Add a default constructor to DefUse to ensure that the pointer members are
properly initialized to zero.

Change-Id: I80a1858be2662c246f0f1ecd2fa6f795bbdabf87
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
src/qml/qml/v4/qv4ssa.cpp

index 937b183..8076b6d 100644 (file)
@@ -791,6 +791,10 @@ void convertToSSA(Function *function, const DominatorTree &df)
 class DefUsesCalculator: public StmtVisitor, public ExprVisitor {
 public:
     struct DefUse {
+        DefUse()
+            : defStmt(0)
+            , blockOfStatement(0)
+        {}
         Stmt *defStmt;
         BasicBlock *blockOfStatement;
         QList<Stmt *> uses;