diff options
Diffstat (limited to 'src/checks/level3/thread-with-slots.cpp')
-rw-r--r-- | src/checks/level3/thread-with-slots.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/checks/level3/thread-with-slots.cpp b/src/checks/level3/thread-with-slots.cpp index 590aec65..36b5f2aa 100644 --- a/src/checks/level3/thread-with-slots.cpp +++ b/src/checks/level3/thread-with-slots.cpp @@ -24,7 +24,6 @@ #include "HierarchyUtils.h" #include "QtUtils.h" #include "TypeUtils.h" -#include "checkmanager.h" #include "ClazyContext.h" #include "AccessSpecifierManager.h" @@ -36,7 +35,7 @@ using namespace std; static bool hasMutexes(Stmt *body) { - auto declrefs = HierarchyUtils::getStatements<DeclRefExpr>(body); + auto declrefs = clazy::getStatements<DeclRefExpr>(body); for (auto declref : declrefs) { ValueDecl *valueDecl = declref->getDecl(); if (CXXRecordDecl *record = TypeUtils::typeAsRecord(valueDecl->getType())) { @@ -64,10 +63,10 @@ void ThreadWithSlots::VisitStmt(clang::Stmt *stmt) return; FunctionDecl *connectFunc = callExpr->getDirectCallee(); - if (!QtUtils::isConnect(connectFunc)) + if (!clazy::isConnect(connectFunc)) return; - CXXMethodDecl *slot = QtUtils::receiverMethodForConnect(callExpr); + CXXMethodDecl *slot = clazy::receiverMethodForConnect(callExpr); if (!slot || !TypeUtils::derivesFrom(slot->getParent(), "QThread")) return; @@ -105,7 +104,7 @@ void ThreadWithSlots::VisitDecl(Decl *decl) // If we use member mutexes, let's not warn either bool accessesNonMutexMember = false; - auto memberexprs = HierarchyUtils::getStatements<MemberExpr>(body); + auto memberexprs = clazy::getStatements<MemberExpr>(body); for (auto memberexpr : memberexprs) { ValueDecl *valueDecl = memberexpr->getMemberDecl(); if (CXXRecordDecl *record = TypeUtils::typeAsRecord(valueDecl->getType())) { @@ -122,4 +121,4 @@ void ThreadWithSlots::VisitDecl(Decl *decl) emitWarning(method, "Slot " + method->getQualifiedNameAsString() + " might not run in the expected thread"); } -REGISTER_CHECK("thread-with-slots", ThreadWithSlots, CheckLevel3) + |