diff options
author | Allen Winter <allen.winter@kdab.com> | 2017-10-03 11:39:20 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2017-10-03 11:39:20 -0400 |
commit | 5631e0772f65ddac821bfe1571dc1c74a9f3c147 (patch) | |
tree | ec17320b6025afceabf55ad73695067e07990c3f | |
parent | fdb65bfc342929b3f96dbf851c4e53a5ce402f9e (diff) | |
parent | ee1091cd855c9fa5e7569ce67c04239b2e4ae929 (diff) |
Merge branch 'master' of git://anongit.kde.org/clazy
-rw-r--r-- | src/checks/level1/nonpodstatic.cpp | 3 | ||||
-rw-r--r-- | src/checks/level2/qstring-allocations.cpp | 7 |
2 files changed, 9 insertions, 1 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 1ff1fcf4..dd0c0bef 100644 --- a/src/checks/level2/qstring-allocations.cpp +++ b/src/checks/level2/qstring-allocations.cpp @@ -29,6 +29,7 @@ #include "StringUtils.h" #include "FixItUtils.h" #include "FunctionUtils.h" +#include "QtUtils.h" #include "checkmanager.h" #include <clang/AST/DeclCXX.h> @@ -69,6 +70,12 @@ QStringAllocations::QStringAllocations(const std::string &name, ClazyContext *co void QStringAllocations::VisitStmt(clang::Stmt *stm) { + if (m_context->isQtDeveloper() && QtUtils::isBootstrapping(m_preprocessorOpts)) { + // During bootstrap many QString::fromLatin1() are used instead of tr(), which causes + // much noise + return; + } + VisitCtor(stm); VisitOperatorCall(stm); VisitFromLatin1OrUtf8(stm); |