1 // RUN: %clang_analyze_cc1 -std=c++11 -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)5 void 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
connect(QObject * obj)17 void connect(QObject *obj) {
18 obj->connectImpl(nullptr, nullptr, nullptr, nullptr,
19 new QtPrivate::QSlotObjectBase(), (Qt::ConnectionType)0,
20 nullptr, nullptr);
21 }
22