Is analysis cross translation unit possible?

Hi all, according to the following issue:

Continuing the discussion from Uninitialized value used but not pointed out:

Do analysis cross translation units possible?

Or there is always a limitation there?

Hi @deron.chen,

Cross translation-units analysis is possible for some rules. For example, the rule about unused functions.

Yet cross translation-units analysis is considerably more difficult to perform for path-sensitive issues, like the one you mentioned. Especially at scale.

To answer your first question: At the moment our analysis for C, C++, and Objective-C does not support path-sensitive issues across translation units. It is possible for some simpler (AST-based) rules.

To answer your second question: This limitation might be lifted one day. We are considering ways to extend path-sensitive analysis across translation units.

Let me know if the answer is not clear or you have further questions.
P.S. I apologize for taking so long to respond.

1 Like

Hi @necto,
Thanks for the answer, help a lot. :grinning_face_with_smiling_eyes:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.