Summary: | clazy-qvariant-template-instantiation: don't warn about type aliases | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Milian Wolff <mail> |
Component: | general | Assignee: | Sergio Martins <smartins> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | smartins |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Milian Wolff
2019-05-08 07:27:25 UTC
The AST for v.value<int>() is the same as v.value<qint32>() :/ getting the used typedef usually works, but in this case (with templates) I'm not seeing how. I guess because the compiler instantiates the value<int> template directly, discarding the original typedef info. Will have to parse what's inside < and > manually Git commit 52c35819162bd23b3b4e406784fa5cbc17cedfcc by Sergio Martins. Committed on 09/05/2019 at 19:10. Pushed by smartins into branch 'master'. qvariant-template-instantiation: Move out of level 0, since it has false-positives This check has really been noise since its creation. The rate of false-positives don't justify the insignificant compilation performance gains. Moved to manual level now. Currently it has a bug, which doesn't seem possible to solve, as the instantiated template doesn't carry over the information about the qint32 typedef. And the CallExpr doesn't have any template related getters. Also removed this check from the "performance" category in checks.json, since this category is for runtime performance. M +1 -1 CheckSources.cmake M +1 -1 README.md M +1 -2 checks.json M +6 -1 docs/checks/README-qvariant-template-instantiation.md M +1 -1 readmes.cmake M +2 -2 src/Checks.h R +0 -0 src/checks/manuallevel/qvariant-template-instantiation.cpp [from: src/checks/level0/qvariant-template-instantiation.cpp - 100% similarity] R +0 -0 src/checks/manuallevel/qvariant-template-instantiation.h [from: src/checks/level0/qvariant-template-instantiation.h - 100% similarity] https://commits.kde.org/clazy/52c35819162bd23b3b4e406784fa5cbc17cedfcc |