1 // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus -verify %s
2 // expected-no-diagnostics
3 #include "Inputs/qt-simulator.h"
5 void send(QObject
*obj
)
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
);
17 void connect(QObject
*obj
) {
18 obj
->connectImpl(nullptr, nullptr, nullptr, nullptr,
19 new QtPrivate::QSlotObjectBase(), (Qt::ConnectionType
)0,
23 void singleShot(QTimer
*timer
) {
24 timer
->singleShotImpl(0, (Qt::TimerType
)0, nullptr,
25 new QtPrivate::QSlotObjectBase());