SUSE / clang-extract

A tool to extract code content from source files using the clang and LLVM infrastructure.
Other
16 stars 2 forks source link

Remove redundant decls #116

Closed giulianobelinassi closed 3 months ago

giulianobelinassi commented 3 months ago

Pass through the closure set looking for Decls we can erase. For example:

struct ll;

struct ll;

int get(struct ll *);

struct ll;

We just need the first struct ll;

marcosps commented 3 months ago

It reduced the LoC of some big LP files, but that one that I mentioned cls_flower still contains the unused structures as before. Some examples where it was reduced:

ext4 remoutn case: LoC: 2093 LoC expected: 2113

amdgpu client_modeset: LoC: 827
LoC expected: 842

And some more modest, like this af_packet LP: LoC: 651
LoC expected: 655