diff options
author | William Bader <williambader@hotmail.com> | 2018-01-24 09:03:50 +0000 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2018-01-24 09:03:50 +0000 |
commit | 5e241ba130bbc9537aaa948f7f134065c28b3836 (patch) | |
tree | 0e3e3671428caf588e6cd2da915a845357e7f153 /src | |
parent | 38945f7c90e63ef105ea629b3779e8fa6eb0c371 (diff) |
inefficient-qlist: Fix crash on incomplete types
BUG: 389360
Diffstat (limited to 'src')
-rw-r--r-- | src/checks/inefficientqlistbase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/checks/inefficientqlistbase.cpp b/src/checks/inefficientqlistbase.cpp index f9f62998..c4d10d17 100644 --- a/src/checks/inefficientqlistbase.cpp +++ b/src/checks/inefficientqlistbase.cpp @@ -96,7 +96,7 @@ void InefficientQListBase::VisitDecl(clang::Decl *decl) if (types.empty()) return; QualType qt2 = types[0]; - if (!qt2.getTypePtrOrNull()) + if (!qt2.getTypePtrOrNull() || qt2->isIncompleteType()) return; const int size_of_ptr = TypeUtils::sizeOfPointer(&m_astContext, qt2); // in bits |