[clazy] [Bug 353767] Support for a supression file

Richard via KDE Bugzilla bugzilla_noreply at kde.org
Mon Apr 18 08:28:33 BST 2016


https://bugs.kde.org/show_bug.cgi?id=353767

--- Comment #3 from Richard <r.oehlinger at avibit.com> ---


(In reply to Sergio Martins from comment #2)
> (In reply to Richard from comment #1)
> > It would be possible to work with clazy warnings like ordinary compiler
> > warnings?
> > E.g. have them disabled locally with
> > 
> > #pragma clang diagnostic push
> > #pragma clang diagnostic ignored "-Wclazy-somecheck"
> >     //some offending code
> > #pragma clang diagnostic pop
> > 
> > Also this would allow to treat some of the clazy warnings as errors and some
> > still as warnings.
> 
> Good idea but I couldn't find a way to implement this. There's no way for a
> plugin to register warnings that #pragma would understand

It could be done by registering an own PragmaHandler [1]. But at the cost of
having either a "Unknown pragma" warning on not-clazy runs, or using a macro
which expands to the pragma or nothing on ordinary compiles. Or of course
disable that particular warning all together.
It would nevertheless be a decision which has to be made by the user of the
tool and purely opt-in.

[1] http://clang.llvm.org/doxygen/classclang_1_1PragmaHandler.html

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list