cldoc icon indicating copy to clipboard operation
cldoc copied to clipboard

Circular dependency issue with #pragma once

Open jjrv opened this issue 11 years ago • 0 comments

I've got a class.h and a class-inl.h with its inline functions. #pragma once seems to have problems if class.h includes class-inl.h at the end. To successfully parse class-inl.h when cldoc runs clang on it, it must include class.h creating a circular dependency. When cldoc processes class.h, #pragma once is ignored because it's the main file. Then class-inl.h includes it again and clang fails to parse.

This has been discussed before in issue #4.

A workaround is to not have cldoc parse class-inl.h files and place no documentation there. Then the #include class.h can be removed from them.

jjrv avatar Jul 21 '14 14:07 jjrv