Bug 465408 - clazy-incorrect-emit give warning about missing emit keyword if emit is in a macro
Summary: clazy-incorrect-emit give warning about missing emit keyword if emit is in a ...
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-07 09:06 UTC by Trần Nam Tuấn (Bill)
Modified: 2023-02-07 09:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test project (1005 bytes, application/gzip)
2023-02-07 09:06 UTC, Trần Nam Tuấn (Bill)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trần Nam Tuấn (Bill) 2023-02-07 09:06:11 UTC
Created attachment 156019 [details]
Test project

SUMMARY
I write a lot of setters, so I create a macro to avoid retyping a lot of the code:
#define UPDATE(NAME)        \
    if (m_##NAME == newVar) \
        return;             \
    m_##NAME = newVar;      \
    Q_EMIT NAME##Changed(newVar);

Clazy then warn about "missing emit keyword on signal call" if I use the macro.
The code does work, however.
Tested in QtCreator and Kdevelop.

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Plasma Version: 5.26.5 
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Clazy: 1.11