blob: 79e83bcab3ad918c7b54da6057fdeff0517d7a82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <QtCore/QString>
#include <QtCore/QList>
#include <QtCore/QDateTime>
// clazy:excludeall=foreach
// clazy:excludeall=qdatetime-utc comment with junk
void suppress_qstring_allocation()
{
// NOLINTNEXTLINE
QString s = "foo";
if (s == "foo") {} // clazy:exclude=qstring-allocations
if (s == "foo") {} // clazy:exclude=qstring-allocations comment with other junk
if (s == "foo") {}
}
struct BigTrivial
{
int a, b, c, d, e;
};
void suppress_foreach()
{
QList<BigTrivial> list;
foreach (BigTrivial b, list) { }
}
void qdatetimeutc()
{
QDateTime::currentDateTime().toTime_t();
}
|