diff options
author | Sergio Martins <smartins@kde.org> | 2019-05-09 15:38:49 +0100 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2019-05-09 15:38:49 +0100 |
commit | 948a23ae1b1553cf67dc8b523236cc0e7dc74994 (patch) | |
tree | e32ae3a7ae942b1198fd3764f58ea6661dfba4db /src | |
parent | 008cdc9d14522a56d5410a7b37e4a0a2cb3c673a (diff) |
inefficient-qlist: Dont warn for QVariantList
It's commonly used to interact with Qt API.
This will be solved in Qt 6 anyway.
Diffstat (limited to 'src')
-rw-r--r-- | src/checks/inefficientqlistbase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/checks/inefficientqlistbase.cpp b/src/checks/inefficientqlistbase.cpp index 51fb104a..d75a2426 100644 --- a/src/checks/inefficientqlistbase.cpp +++ b/src/checks/inefficientqlistbase.cpp @@ -87,7 +87,7 @@ bool InefficientQListBase::shouldIgnoreVariable(VarDecl *varDecl) const void InefficientQListBase::VisitDecl(clang::Decl *decl) { - VarDecl *varDecl = dyn_cast<VarDecl>(decl); + auto varDecl = dyn_cast<VarDecl>(decl); if (!varDecl) return; @@ -97,7 +97,7 @@ void InefficientQListBase::VisitDecl(clang::Decl *decl) return; CXXRecordDecl *recordDecl = t->getAsCXXRecordDecl(); - if (!recordDecl || clazy::name(recordDecl) != "QList") + if (!recordDecl || clazy::name(recordDecl) != "QList" || type.getAsString() == "QVariantList") return; const std::vector<clang::QualType> types = clazy::getTemplateArgumentsTypes(recordDecl); |