This reverts commit d50d9946d1d7e5f20881f0bc71fbd025040b1c96. Broke check-clang, see comments on https://reviews.llvm.org/D126067 Also revert dependent change "[analyzer] Deprecate the unused 'analyzer-opt-analyze-nested-blocks' cc1 flag" This reverts commit 07b4a6d0461fe64e10d30029ed3d598e49ca3810. Also revert "[analyzer] Fix buildbots after introducing a new frontend warning" This reverts commit 90374df15ddc58d823ca42326a76f58e748f20eb. (See https://reviews.llvm.org/rG90374df15ddc58d823ca42326a76f58e748f20eb)
22 lines
831 B
C++
22 lines
831 B
C++
// RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus -analyzer-store=region -verify %s
|
|
// expected-no-diagnostics
|
|
#include "Inputs/qt-simulator.h"
|
|
|
|
void send(QObject *obj)
|
|
{
|
|
QEvent *e1 = new QEvent(QEvent::None);
|
|
static_cast<QApplication *>(QCoreApplication::instance())->postEvent(obj, e1);
|
|
QEvent *e2 = new QEvent(QEvent::None);
|
|
QCoreApplication::instance()->postEvent(obj, e2);
|
|
QEvent *e3 = new QEvent(QEvent::None);
|
|
QCoreApplication::postEvent(obj, e3);
|
|
QEvent *e4 = new QEvent(QEvent::None);
|
|
QApplication::postEvent(obj, e4);
|
|
}
|
|
|
|
void connect(QObject *obj) {
|
|
obj->connectImpl(nullptr, nullptr, nullptr, nullptr,
|
|
new QtPrivate::QSlotObjectBase(), (Qt::ConnectionType)0,
|
|
nullptr, nullptr);
|
|
}
|