Closed
Bug 500868
Opened 15 years ago
Closed 6 years ago
Warn about unnecessarily virtual methods
Categories
(Developer Infrastructure :: Source Code Analysis, enhancement)
Developer Infrastructure
Source Code Analysis
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: jruderman, Unassigned)
References
Details
(Keywords: perf)
Might be useful to have an analysis capable of warning: "No subclasses implement this virtual method. Does it really need to be virtual?" I believe this would require doing analysis across compilation units, which is tricky.
Comment 1•15 years ago
|
||
Actually we have a lot of those methods. These are needed to call things across shared libaries
Reporter | ||
Comment 2•15 years ago
|
||
Hmm, could we have a special annotation for virtual methods that are meant to cross library boundaries? Also, if no implementations are found and the base class is abstract, there's no need to warn.
Comment 3•15 years ago
|
||
(In reply to comment #2) > Hmm, could we have a special annotation for virtual methods that are meant to > cross library boundaries? Also, if no implementations are found and the base > class is abstract, there's no need to warn. I've run into this during dead code analysis, you run into all kinds of APIs exported by mozilla that aren't used much inside. We could mark all idl-derived stuff easily and automagically. But i'm still not sure if it's worth the hassle for the rest.
Updated•7 years ago
|
Product: Core → Firefox Build System
![]() |
||
Comment 4•6 years ago
|
||
We are not realistically going to have these kinds of analyses across compilation units anytime soon.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•