Closed gamesh411 closed 5 years ago
I have run into a dependency issue. If I store the TU threshold as an AnalyzerOption, then I have to link with libStaticAnalyzerCore (see CMakeLists.txt change). But this introduces a cyclic dependency. I see a couple of solutions to this problem:
a) put the option elsewhere, for example as a general frontend-option b) make the check elsewhere, for example inside some analyzer-specific manager class c) try to cut the dependency by introducing intermediary libs
What are your thoughts?
I prefer option a). Because CrossTU is ought to be independent from the analyzer, that is more generic.
Shouldn't this be an analyzer config option instead? I am aware of several CTU options that are just that, why is this a frontend option?
Shouldn't this be an analyzer config option instead? I am aware of several CTU options that are just that, why is this a frontend option?
Yes this should be an analyzer option, but the first attempt somehow created a lib dependency failure.
So, Endre is working on the second attempt where he will extend the parameters of CrossTranslationUnitContext::getCrossTUDefinition
like we do with DisplayCTUProgress
.
Shouldn't this be an analyzer config option instead? I am aware of several CTU options that are just that, why is this a frontend option?
Yes this should be an analyzer option, but the first attempt somehow created a lib dependency failure.
The reason probably was that my analyzer config changes are not live on clang7 -- the solution would be to leave the option's getter method in-class, I believe.
deadline for this is 31st of March!
Reorganized parameter handling, added unit test and some documentation.
Sorry for missing out on the discussion. I think adding this as an analyzer-config flag WOULD be preferred on clang 8.0.0, but since we can't list and verify these options in 7.0.0., let's not shoot ourselves in the foot with them.
LGTM regarding option placement, I can't say much about the rest of the patch.
I have run into a dependency issue. If I store the TU threshold as an AnalyzerOption, then I have to link with libStaticAnalyzerCore (see CMakeLists.txt change). But this introduces a cyclic dependency. I see a couple of solutions to this problem:
a) put the option elsewhere, for example as a general frontend-option b) make the check elsewhere, for example inside some analyzer-specific manager class c) try to cut the dependency by introducing intermediary libs
What are your thoughts?