unusedcode some step further

Michael Meeks michael.meeks at suse.com
Tue Apr 2 13:43:19 PDT 2013


On Mon, 2013-04-01 at 16:04 +0200, Noel Grandin wrote:
> Another way is to use a clang plugin to generate a more accurate list
> of definitions and call sites.
> That's what I would do, because clang would handle all of the macro
> and language parsing. 

	Completely agreed; I imagine it would be necessary to write some
intermediate format out from each clang compile - and then crunch those
together afterwards to see what was actually used.

	Hopefully - given the level of context that clang has - it'd be
reasonably easy to identify and elide virtual methods even DLLPUBLIC
ones - though we would presumably want to white-list any UNO interfaces'
virtual methods - which may well never be called; yet can't be removed.

	The compilerplugins/ directory has some nice README about plugins and
all the good things they can do :-) Potentially with a double pass
through the code - clang could auto-generate diffs of things o
remove ;->

	HTH,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list