You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the following example code, run the Clang-Tidy as clang-tidy foo.cpp -- -isystem /usr/include/qt/QtCore/ -I/usr/include/qt/ (Suppose the Qt 5 headers installed at /usr/include/qt)
#include<QWeakPointer>voidtest(const QWeakPointer<QObject>& p)
{
QWeakPointer<QObject> t;
t = p;
}
The following warning generated
1 warning generated./usr/include/qt/QtCore/qsharedpointer_impl.h:159:50: warning: Use of memory after it is freed [clang-analyzer-cplusplus.NewDelete] inline void operator delete(void *ptr) { ::operator delete(ptr); } ^
It's strange when using -I instead of -isystem, it won't report this problem, which is expected (Even using -header-filter=.*).