Open Bug 1529744 Opened 5 years ago Updated 2 years ago

Consider analysis to prevent unused methods with CRTP pattern

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement, P3)

enhancement

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)

Component: JavaScript Engine → Source Code Analysis
Product: Core → Firefox Build System

The priority flag is not set for this bug.
:sylvestre, could you have a look please?

Flags: needinfo?(sledru)

Jimm, Anthony, is that something your team would like to work on?

Severity: normal → enhancement
Flags: needinfo?(sledru)
Flags: needinfo?(jmathies)
Flags: needinfo?(ajones)
Priority: -- → P3

I don't think our team would tackle this, sounds like another good idea to drop in the generic code checkin hook bucket.

Flags: needinfo?(jmathies)

I'm going to pass this question on to Eric.

Flags: needinfo?(ajones) → needinfo?(erahm)

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?

Flags: needinfo?(erahm) → needinfo?(jorendorff)

No, this isn't a priority for me.

Flags: needinfo?(jorendorff)
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.