diff options
author | dim <dim@FreeBSD.org> | 2016-01-06 20:02:26 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-01-06 20:02:26 +0000 |
commit | fc74ff5a0792641885551a63d9ddf8cbfdf76e3c (patch) | |
tree | 955a1295c3fd4378a49478ad5835ca21b769417e /test/Analysis/qt_malloc.cpp | |
parent | 3176e97f130184ece0e1a21352c8124cc83ff24a (diff) | |
download | FreeBSD-src-fc74ff5a0792641885551a63d9ddf8cbfdf76e3c.zip FreeBSD-src-fc74ff5a0792641885551a63d9ddf8cbfdf76e3c.tar.gz |
Vendor import of clang trunk r256945:
https://llvm.org/svn/llvm-project/cfe/trunk@256945
Diffstat (limited to 'test/Analysis/qt_malloc.cpp')
-rw-r--r-- | test/Analysis/qt_malloc.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Analysis/qt_malloc.cpp b/test/Analysis/qt_malloc.cpp new file mode 100644 index 0000000..d29835f --- /dev/null +++ b/test/Analysis/qt_malloc.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -analyze -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); +} |