bkryza / clang-uml

Customizable automatic UML diagram generator for C++ based on Clang.
Apache License 2.0
588 stars 40 forks source link

Do the code need to be compliable? #300

Open RBEI-VENKAT opened 1 month ago

RBEI-VENKAT commented 1 month ago

Hello , I want to use clang-umnl tool to generate sequence diagram for legacy code mainly for the microcontroller code. The code does not have cmake configuration. I just generated compile_commands.json adding all c files to cmake. when i tried to generate the sequence diagram there are some compilation errors, mainly regarding includes? So, do we need the code should be in compliable format?

bkryza commented 1 month ago

@RBEI-VENKAT Yes the code must be in a state when it compiles without errors, otherwise Clang will fail to parse it and return before the diagrams can be generated.

However, you don't need cmake to generate compile_commands.json - if you build your code using make you can try Bear.