[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 Sergio Martinschanged: What|Removed |Added Status|REOPENED|RESOLVED Latest Commit||http://commits.kde.org/claz ||y/ff28b66ce5ce8b6f76487c62c ||21063676df41cc0 Resolution|--- |FIXED --- Comment #5 from Sergio Martins --- Git commit ff28b66ce5ce8b6f76487c62c21063676df41cc0 by Sergio Martins. Committed on 28/02/2016 at 13:32. Pushed by smartins into branch 'master'. Introduce unused-non-trivial-variable check Because the compilers don't warn for unused non-trivial Qt value classes. This check has a whitelist of classes and warns when they there are unused variables. M +2-1CMakeLists.txt A +8-0checks/README-unused-non-trivial-variable A +95 -0checks/unused-non-trivial-variable.cpp [License: LGPL (v2+)] A +49 -0checks/unused-non-trivial-variable.h [License: LGPL (v2+)] M +11 -11 tests/clazy/test_requested_checks.sh.expected A +7-0tests/unused-non-trivial-variable/config.json A +36 -0tests/unused-non-trivial-variable/main.cpp [License: UNKNOWN] * A +2-0tests/unused-non-trivial-variable/main.cpp.expected The files marked with a * at the end have a non valid license. Please read: http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page. http://commits.kde.org/clazy/ff28b66ce5ce8b6f76487c62c21063676df41cc0 -- You are receiving this mail because: You are watching all bug changes.
[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 Sergio Martinschanged: What|Removed |Added Assignee|unassigned-b...@kde.org |smart...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 Sergio Martinschanged: What|Removed |Added Ever confirmed|0 |1 Resolution|WORKSFORME |--- Status|RESOLVED|REOPENED --- Comment #4 from Sergio Martins --- We could have a [warn_unused] attribute and tag Qt containers with it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55203 -- You are receiving this mail because: You are watching all bug changes.
[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 --- Comment #3 from Nyall Dawson--- Here's a simple test case: #include #include int main(int, char **) { QString string; //no warning QList list; //no warning QVariant var; //no warning QIcon i; //no warning int num; //warning } building this with clang 3.7 warns only about the unused int variable, not the unused QString/QList/QVariant etc. -- You are receiving this mail because: You are watching all bug changes.
[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 Sergio Martinschanged: What|Removed |Added Resolution|--- |WORKSFORME Status|UNCONFIRMED |RESOLVED --- Comment #2 from Sergio Martins --- clang already warns on unused variables, so clazy won't duplicate functionality -- You are receiving this mail because: You are watching all bug changes.
[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 Sergio Martinschanged: What|Removed |Added Severity|normal |wishlist -- You are receiving this mail because: You are watching all bug changes.
[clazy] [Bug 359000] new check: warn about unused Qt objects
https://bugs.kde.org/show_bug.cgi?id=359000 --- Comment #1 from Sergio Martins--- can you attach a test-case ? -- You are receiving this mail because: You are watching all bug changes.