Bug 437092 - clazy believes member function template is signal
Summary: clazy believes member function template is signal
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-14 15:16 UTC by christian.kandeler
Modified: 2021-05-14 22:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example project. Wrong diagnostic at main.cpp:8 (3.59 KB, application/gzip)
2021-05-14 15:16 UTC, christian.kandeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christian.kandeler 2021-05-14 15:16:05 UTC
Created attachment 138420 [details]
Example project. Wrong diagnostic at main.cpp:8

Example project is attached.
Originated from https://bugreports.qt.io/browse/QTCREATORBUG-25734.
Comment 1 Sergio Martins 2021-05-14 22:25:09 UTC
Git commit 38e2a693b4e175713e15ff1715a597860a0c2bc3 by Sergio Martins.
Committed on 14/05/2021 at 22:20.
Pushed by smartins into branch 'master'.

incorrect-emit: Add unit-test for a bug

A  +20   -0    tests/incorrect-emit/bug437092.cpp  *
A  +0    -0    tests/incorrect-emit/bug437092.cpp.expected
M  +4    -0    tests/incorrect-emit/config.json

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/sdk/clazy/commit/38e2a693b4e175713e15ff1715a597860a0c2bc3
Comment 2 Sergio Martins 2021-05-14 22:39:58 UTC
Git commit def0b3d9620876d69456c907ee276e86c880147c by Sergio Martins.
Committed on 14/05/2021 at 22:37.
Pushed by smartins into branch '1.9'.

incorrect-emit: Don't classify template functions as signals

It was using the loc of the method definition, which is after
"signals". Instead of improving the loc calculation for the
template case, simply bail out early and save some CPU cycles.

signals can't be templated

M  +1    -1    src/AccessSpecifierManager.cpp

https://invent.kde.org/sdk/clazy/commit/def0b3d9620876d69456c907ee276e86c880147c
Comment 3 Sergio Martins 2021-05-14 22:41:36 UTC
Git commit 39adc47e8dcb7d8a86ff76a17c107c35874d4ec4 by Sergio Martins.
Committed on 14/05/2021 at 22:38.
Pushed by smartins into branch 'master'.

Merge branch '1.9'

M  +1    -2    tests/incorrect-emit/config.json

https://invent.kde.org/sdk/clazy/commit/39adc47e8dcb7d8a86ff76a17c107c35874d4ec4