Bug 387353 - clazy-standalone reports warnings for -isystem headers
Summary: clazy-standalone reports warnings for -isystem headers
Status: RESOLVED WORKSFORME
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-27 12:59 UTC by Konstantin Tokarev
Modified: 2018-01-13 19:07 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Tokarev 2017-11-27 12:59:02 UTC
In my case compilation database contains -isystem ../DependenciesQT/Root/include/QtWidgets but I'm getting warnings for e.g. ../DependenciesQT/Root/include/QtWidgets/qapplication.h
Comment 1 Sergio Martins 2017-12-01 18:59:16 UTC
I can't reproduce:

$ clazy-standalone rule-of-three/main.cpp -checks=rule-of-three  -- -Wno-unused-value -Qunused-arguments -std=c++14 -isystem /data/installation/qt/x86_64-5.9/include -fPIC 

4 warnings

With -I instead of -isystem there's 13 warnings

Maybe you have some other -I
Comment 2 Sergio Martins 2018-01-13 19:00:48 UTC
reopen if you have a test-case, I can't repro
Comment 3 Konstantin Tokarev 2018-01-13 19:03:17 UTC
Did you try with relative path in -isystem like in my example?
Comment 4 Sergio Martins 2018-01-13 19:07:23 UTC
Yeah, also works with relative:

$ clazy-standalone rule-of-three/main.cpp -checks=rule-of-three  -- -Wno-unused-value -Qunused-arguments -std=c++14 -isystem ../../../installation/qt/x86_64-5.9/include -fPIC 
In file included from /data/sources/clazy/tests/rule-of-three/main.cpp:1:
/data/sources/clazy/tests/rule-of-three/main.h:5:1: warning: HasDtor has dtor but not copy-ctor, copy-assignment [-Wclazy-rule-of-three]
struct HasDtor // Warning
^
/data/sources/clazy/tests/rule-of-three/main.h:10:1: warning: HasDtorAndCopyCtor has dtor, copy-ctor but not copy-assignment [-Wclazy-rule-of-three]
struct HasDtorAndCopyCtor // Warning
^
/data/sources/clazy/tests/rule-of-three/main.h:27:1: warning: HasCopyCtor has copy-ctor but not dtor, copy-assignment [-Wclazy-rule-of-three]
struct HasCopyCtor // Warning
^
3 warnings generated.