Bug 375264

Summary: False positives reported for "not a signal"
Product: [Developer tools] clazy Reporter: Allen Winter <winter>
Component: generalAssignee: Sergio Martins <smartins>
Status: RESOLVED FIXED    
Severity: normal CC: smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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