diff options
author | Sergio Martins <smartins@kde.org> | 2017-10-03 11:33:10 +0100 |
---|---|---|
committer | Sergio Martins <iamsergio@gmail.com> | 2017-10-03 11:33:10 +0100 |
commit | ee1091cd855c9fa5e7569ce67c04239b2e4ae929 (patch) | |
tree | 98710a88d2fe183f65030755b62bce8eedf8d9ad /src | |
parent | 1d3e06d686f80b869bc84a67a3c28fb715919aa8 (diff) |
Only run QtUtils::isBootstrapping() if we're building Qt
for performance reasons
Diffstat (limited to 'src')
-rw-r--r-- | src/checks/level1/nonpodstatic.cpp | 3 | ||||
-rw-r--r-- | src/checks/level2/qstring-allocations.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/checks/level1/nonpodstatic.cpp b/src/checks/level1/nonpodstatic.cpp index f792eed7..05b510f7 100644 --- a/src/checks/level1/nonpodstatic.cpp +++ b/src/checks/level1/nonpodstatic.cpp @@ -28,6 +28,7 @@ #include "MacroUtils.h" #include "QtUtils.h" #include "checkmanager.h" +#include "ClazyContext.h" #include <clang/AST/DeclCXX.h> #include <clang/Lex/Lexer.h> @@ -87,7 +88,7 @@ void NonPodStatic::VisitStmt(clang::Stmt *stm) } } - if (QtUtils::isBootstrapping(m_preprocessorOpts)) + if (m_context->isQtDeveloper() && QtUtils::isBootstrapping(m_preprocessorOpts)) return; const string className = recordDecl->getName(); diff --git a/src/checks/level2/qstring-allocations.cpp b/src/checks/level2/qstring-allocations.cpp index 42b3c22b..dd0c0bef 100644 --- a/src/checks/level2/qstring-allocations.cpp +++ b/src/checks/level2/qstring-allocations.cpp @@ -70,7 +70,7 @@ QStringAllocations::QStringAllocations(const std::string &name, ClazyContext *co void QStringAllocations::VisitStmt(clang::Stmt *stm) { - if (QtUtils::isBootstrapping(m_preprocessorOpts)) { + if (m_context->isQtDeveloper() && QtUtils::isBootstrapping(m_preprocessorOpts)) { // During bootstrap many QString::fromLatin1() are used instead of tr(), which causes // much noise return; |