Bug 387353

Summary: clazy-standalone reports warnings for -isystem headers
Product: [Developer tools] clazy Reporter: Konstantin Tokarev <annulen>
Component: generalAssignee: Sergio Martins <smartins>
Status: RESOLVED WORKSFORME    
Severity: normal CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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.