aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergio Martins <smartins@kde.org>2017-10-03 11:33:10 +0100
committerSergio Martins <iamsergio@gmail.com>2017-10-03 11:33:10 +0100
commitee1091cd855c9fa5e7569ce67c04239b2e4ae929 (patch)
tree98710a88d2fe183f65030755b62bce8eedf8d9ad /src
parent1d3e06d686f80b869bc84a67a3c28fb715919aa8 (diff)
Only run QtUtils::isBootstrapping() if we're building Qt
for performance reasons
Diffstat (limited to 'src')
-rw-r--r--src/checks/level1/nonpodstatic.cpp3
-rw-r--r--src/checks/level2/qstring-allocations.cpp2
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;