This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Link libStaticAnalyzerCheckers to libASTMatchers.
ClosedPublic

Authored by NoQ on Oct 10 2016, 1:04 AM.

Details

Summary

ASTMatchers are sometimes handy in the Analyzer, and there are more patches to make use of them.

However, it turns out that not only the Analyzer, but also the whole clang binary was never linked to libASTMatchers. So there's a binary size concern.

On my machine (mac) binary size increases by:

  • 0.5% (73 731 296 bytes => 74 118 172 bytes) in release mode,
  • 2% (243 942 672 bytes => 249 748 052 bytes) in debug mode.

Is such increase bearable? Would anybody approve that?

Diff Detail

Event Timeline

NoQ updated this revision to Diff 74109.Oct 10 2016, 1:04 AM
NoQ retitled this revision from to [analyzer] Link libStaticAnalyzerCheckers to libASTMatchers..
NoQ updated this object.
NoQ added a subscriber: cfe-commits.
xazax.hun edited edge metadata.Oct 10 2016, 1:13 AM

I might be confused, but as far as I remember, when you do static linking, symbols tend to be linked in lazily. So as long as you do not use the matchers, those numbers might be misleading.

NoQ added a comment.Oct 10 2016, 1:14 AM

I might be confused, but as far as I remember, when you do static linking, symbols tend to be linked in lazily. So as long as you do not use the matchers, those numbers might be misleading.

Yep, i did actually obtain these numbers by using matchers in one of the checkers.

In D25429#565940, @NoQ wrote:

I might be confused, but as far as I remember, when you do static linking, symbols tend to be linked in lazily. So as long as you do not use the matchers, those numbers might be misleading.

Yep, i did actually obtain these numbers by using matchers in one of the checkers.

Great! I am in favour of this change. I wonder, however, if it is worth to ask this on the mailing list as well.

alexfh edited edge metadata.Oct 10 2016, 12:36 PM

The change seems to be reasonable, and the size increase is not huge. However, I'm not sure who should make the call.

zaks.anna edited edge metadata.Oct 10 2016, 12:51 PM

I am in support of this as well.

zaks.anna edited edge metadata.Oct 10 2016, 11:10 PM
zaks.anna added a subscriber: rsmith.
zaks.anna accepted this revision.Oct 11 2016, 7:56 PM
zaks.anna edited edge metadata.
This revision is now accepted and ready to land.Oct 11 2016, 7:56 PM
This revision was automatically updated to reflect the committed changes.