Bug 375264 - False positives reported for "not a signal"
Summary: False positives reported for "not a signal"
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-18 22:38 UTC by Allen Winter
Modified: 2017-01-29 16:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allen Winter 2017-01-18 22:38:18 UTC
running the current clazy built from git master I'm seeing these false positives in kdstatemachineeditor (git@github.com:KDAB/KDStateMachineEditor.git)

3. clazy-connect-non-signal...  OOPS! 21 issues found!

  /home/allen/projects/kdstatemachineeditor/src/view/quick/quickrecursiveinstantiator.cpp
    line 68: connect(m_model, &QAbstractItemModel::modelReset, this, &QuickRecursiveInstantiator::modelReset);
    => QAbstractItemModel::modelReset is not a signal 
    line 69: connect(m_model, &QAbstractItemModel::rowsInserted, this, &QuickRecursiveInstantiator::rowsInserted);
    => QAbstractItemModel::rowsInserted is not a signal 
    line 70: connect(m_model, &QAbstractItemModel::rowsAboutToBeRemoved, this, &QuickRecursiveInstantiator::rowsAboutToBeRemoved);
    => QAbstractItemModel::rowsAboutToBeRemoved is not a signal 
    line 71: connect(m_model, &QAbstractItemModel::destroyed, this, &QuickRecursiveInstantiator::modelDestroyed);
    => QObject::destroyed is not a signal
Comment 1 Allen Winter 2017-01-18 22:59:11 UTC
I ran 'ccache --clear' and tried again.  still reporting the false positives
Comment 2 Sergio Martins 2017-01-28 18:46:08 UTC
Can you check if you're using precompiled headers ?

Paste the compiler invocation
Comment 3 Sergio Martins 2017-01-29 16:43:45 UTC
Git commit 9ab57ecd14f5f676cb3377a7669326e5f1db409e by Sergio Martins.
Committed on 29/01/2017 at 16:43.
Pushed by smartins into branch 'master'.

Disable a few checks when pre-compiled headers is enabled

Seems our pre-processor visitor doesn't get called.
Not sure how to fix this properly yet.

M  +2    -0    README.md
M  +7    -2    checkmanager.cpp
M  +1    -0    checkmanager.h
M  +3    -2    checks/level0/connect-non-signal.cpp
M  +4    -2    checks/level0/qt-macros.cpp
M  +2    -1    checks/level1/foreach.cpp
M  +1    -2    checks/level1/incorrect-emit.cpp

https://commits.kde.org/clazy/9ab57ecd14f5f676cb3377a7669326e5f1db409e