1 // RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus -analyzer-store=region -verify %s 2 // expected-no-diagnostics 3 #include "Inputs/qt-simulator.h" 4 send(QObject * obj)5void send(QObject *obj) 6 { 7 QEvent *e1 = new QEvent(QEvent::None); 8 static_cast<QApplication *>(QCoreApplication::instance())->postEvent(obj, e1); 9 QEvent *e2 = new QEvent(QEvent::None); 10 QCoreApplication::instance()->postEvent(obj, e2); 11 QEvent *e3 = new QEvent(QEvent::None); 12 QCoreApplication::postEvent(obj, e3); 13 QEvent *e4 = new QEvent(QEvent::None); 14 QApplication::postEvent(obj, e4); 15 } 16