Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-18 Thread Evgeniy Dushistov via cfe-commits
Dushistov marked an inline comment as done. Dushistov added a comment. > Should the leak be reported when the object is passed to > QApplication::postEvent? No, QApplication::postEvent == QCoreApplication::postEvent, it is just the same function, because of QApplication inherit from QCoreAppli

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-18 Thread Evgeniy Dushistov via cfe-commits
Dushistov updated this revision to Diff 40596. Dushistov added a comment. Make test for usage of different variants of postEvent more robust. http://reviews.llvm.org/D14170 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/Inputs/qt-simulator.h test/Analysis/qt_malloc.cpp

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-18 Thread Evgeniy Dushistov via cfe-commits
Dushistov added a comment. apply all suggestions http://reviews.llvm.org/D14170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-18 Thread Evgeniy Dushistov via cfe-commits
Dushistov marked an inline comment as done. Dushistov added a comment. http://reviews.llvm.org/D14170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-18 Thread Evgeniy Dushistov via cfe-commits
Dushistov updated this revision to Diff 40485. Dushistov added a comment. Replace 'endswith' with 'operator==', also update test to check that all four ways to call postEvent not produce warning http://reviews.llvm.org/D14170 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analys

Re: [PATCH] D14592: Qt (version 4 or 5) signal/method checker

2015-11-11 Thread Evgeniy Dushistov via cfe-commits
Dushistov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/QtSignalSlotChecker.cpp:114 @@ +113,3 @@ + printMethodNameWithPramaTypes(Out, C, FName, M, false); + const std::string NS = qtNormalizeSignature(Out.str()); +

Re: [PATCH] D14592: Qt (version 4 or 5) signal/method checker

2015-11-11 Thread Evgeniy Dushistov via cfe-commits
On Wed, Nov 11, 2015 at 11:58:34PM +, Jonathan Roelofs wrote: > jroelofs added a subscriber: jroelofs. > > > Comment at: lib/StaticAnalyzer/Checkers/QtSignalSlotChecker.cpp:114 > @@ +113,3 @@ > + printMethodNameWithPramaTypes(Out, C, FName, M, > false)

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-11 Thread Evgeniy Dushistov via cfe-commits
Dushistov updated this revision to Diff 39985. Dushistov added a comment. mistype, actually I want to use '&&' here, not '||' to not create std::string, if match failed. http://reviews.llvm.org/D14170 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/Inputs/qt-simulator.h

[PATCH] D14592: Qt (version 4 or 5) signal/method checker

2015-11-11 Thread Evgeniy Dushistov via cfe-commits
Dushistov created this revision. Dushistov added reviewers: dcoughlin, Ayal, xazax.hun, zaks.anna. Dushistov added a subscriber: cfe-commits. In Qt 4/5 it is possible connect classes methods in such way: connect(ObjectPointer1, SIGNAL(methodOfObject1()), ObjectPointer2, SLOT(methodOfObject2());

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-11 Thread Evgeniy Dushistov via cfe-commits
Dushistov marked an inline comment as done. Dushistov added a comment. http://reviews.llvm.org/D14170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-04 Thread Evgeniy Dushistov via cfe-commits
Dushistov updated this revision to Diff 39264. Dushistov added a comment. I reduce testcase to almost minimal variant. http://reviews.llvm.org/D14170 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/Inputs/qt-simulator.h test/Analysis/qt_malloc.cpp Index: test/Analysis/

Re: [PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-11-04 Thread Evgeniy Dushistov via cfe-commits
Dushistov updated this revision to Diff 39265. Dushistov added a comment. Fix line length issue http://reviews.llvm.org/D14170 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/Inputs/qt-simulator.h test/Analysis/qt_malloc.cpp Index: test/Analysis/qt_malloc.cpp =

[PATCH] D14170: Fix false positive warning about memory leak for QApplication::postEvent

2015-10-29 Thread Evgeniy Dushistov via cfe-commits
Dushistov created this revision. Dushistov added reviewers: Ayal, zaks.anna, dcoughlin, xazax.hun. Dushistov added a subscriber: cfe-commits. Recent version of clang (3.7) start complain about such code: void send(QObject *obj) { QKeyEvent *event = new QKeyEvent(QEvent::KeyRelease, Qt::Key