File indexing completed on 2024-04-28 05:38:40

0001 #include <QtCore/QString>
0002 #include <QtCore/QList>
0003 #include <QtCore/QDateTime>
0004 
0005 // clazy:excludeall=foreach
0006 // clazy:excludeall=qdatetime-utc comment with junk
0007 
0008 void suppress_qstring_allocation()
0009 {   
0010     // NOLINTNEXTLINE
0011     QString s = "foo";
0012     if (s == "foo") {} // clazy:exclude=qstring-allocations
0013     if (s == "foo") {} // clazy:exclude=qstring-allocations comment with other junk
0014     if (s == "foo") {}
0015 }
0016 
0017 struct BigTrivial
0018 {
0019     int a, b, c, d, e;
0020 };
0021 
0022 void suppress_foreach()
0023 {
0024     QList<BigTrivial> list;
0025     foreach (BigTrivial b, list) { }
0026 }
0027 
0028 void qdatetimeutc()
0029 {
0030     QDateTime::currentDateTime().toSecsSinceEpoch();
0031 }