forked from qt-creator/qt-creator
ClangTools: Simplify clazy test
...in order to not run into parse errors in qstring.h involving * C++17 * >= Qt 5.14 * stdlibc++ of gcc 5.3/5.4 Change-Id: I8c06f90a88a4dd18503a81b68433604eb3bc9556 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -159,7 +159,7 @@ void ClangToolsUnitTests::testProject_data()
|
|||||||
// Test that tidy and clazy diagnostics are emitted for the same project.
|
// Test that tidy and clazy diagnostics are emitted for the same project.
|
||||||
addTestRow("clangtidy_clazy/clangtidy_clazy.pro",
|
addTestRow("clangtidy_clazy/clangtidy_clazy.pro",
|
||||||
1 /*tidy*/ + 1 /*clazy*/,
|
1 /*tidy*/ + 1 /*clazy*/,
|
||||||
configFor("misc-unconventional-assign-operator", "base-class-event"));
|
configFor("misc-unconventional-assign-operator", "qgetenv"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClangToolsUnitTests::addTestRow(const QByteArray &relativeFilePath,
|
void ClangToolsUnitTests::addTestRow(const QByteArray &relativeFilePath,
|
||||||
|
@@ -23,19 +23,11 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QByteArray>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
// -Wclazy-ctor-missing-parent-argument
|
void test()
|
||||||
class TestObject : public QObject
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
// -Wclazy-qgetenv
|
||||||
|
qgetenv("Foo").isEmpty();
|
||||||
public:
|
}
|
||||||
TestObject();
|
|
||||||
|
|
||||||
bool event(QEvent *) override
|
|
||||||
{
|
|
||||||
// -Wclazy-base-class-event
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
Reference in New Issue
Block a user