Consider analysis to prevent unused methods with CRTP pattern
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: jorendorff, Unassigned)
Details
<jorendorff> I want something like override
but for when i'm overriding a non-virtual method. (yes I promise I know what I'm doing)
<froydnj> wat are you even
<jorendorff> froydnj: this particular method is called only from templates
<jorendorff> froydnj, Sylvestre: to catch this kind of bug https://phabricator.services.mozilla.com/D20720#C623708NL405
<jorendorff> So my actual question is, does the clang plugin ever have enough information that we could do this
<froydnj> jorendorff: yes, the plugin has enough information to do that
<jorendorff> froydnj: if i were to try this in spare time, what existing analysis is the best place to start reading
<froydnj> jorendorff: probably MustOverrideChecker.* and there's some basic documentation on https://clang.llvm.org/docs/index.html ("clang plugins" and following)
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
The priority flag is not set for this bug.
:sylvestre, could you have a look please?
Comment 2•5 years ago
|
||
Jimm, Anthony, is that something your team would like to work on?
Comment 3•5 years ago
|
||
I don't think our team would tackle this, sounds like another good idea to drop in the generic code checkin hook bucket.
I'm going to pass this question on to Eric.
Comment 5•5 years ago
|
||
We're not actively working on static analysis, but it's something we can discuss for H2 planning. Jason, did you still want to take a stab at this?
Updated•2 years ago
|
Updated•2 years ago
|
Description
•