bloomberg / clangmetatool

A framework for reusing code in Clang tools
https://bloomberg.github.io/clangmetatool/
Apache License 2.0
119 stars 25 forks source link

Add weak dependencies analysis for include graph validation #71

Closed liangti closed 2 years ago

liangti commented 2 years ago

Issue number of the reported bug or feature request: #

Describe your changes

We provide a more advance data structure for dependencies analysis

This will help with analyzing diamond include graph dependency

So that given include graph like:

    //              +-> e.h -----+--> def5.h (E)
    //              |            |
    //  foo.cpp  -- +-> diam.h --+

Actually foo.cpp only need either e.h or diam.h in order to access resource(E) defined in def5.h

Testing performed

Add test case to proof the new added function returns expected data to reflect this weak dependencies relationship

Additional context

This change should not break any existent thing since it is adding new function without changing any old functions

liangti commented 2 years ago

@ruoso @dbeer1 @samanpa @nsmith0 @envp

dbeer1 commented 2 years ago

LGTM, any concerns @envp ?

envp commented 2 years ago

LGTM, any concerns @envp ?

None from me.