clang-doc now serializes the inherited attributes and methods, not only the name of the base class.
All inherited are tracked, if B:A and C:B, info of A is included in C.
This data is stored in attribute Bases in a RecordInfo.
Previously tracked inheritance data, stored in Parents and VParents, hasn't been removed to reduce review load.
Details
Diff Detail
Event Timeline
clang-tools-extra/clang-doc/BitcodeWriter.h | ||
---|---|---|
33 | I definitely haven't been particularly good about bumping this, but can you bump it? This is a decently large change. | |
clang-tools-extra/clang-doc/Serialize.cpp | ||
233–275 | s/documentInfo/shouldSerializeInfo | |
277 | s/false//*IsInAnonymousNamespace=*/false | |
436 | Will getDecl() always return a non-null pointer? In the normal case I'd assume so, but the cast_or_null will only catch a null coming out of getDefinition() or the cast, not getDecl, so just want to check. | |
437–439 | Is there a reason this isn't bool IsVirtual = B.IsVirtual()? | |
440–446 | Do this in an if/else -- getNameAsString() is a decently expensive operation, so only do it when you need it. | |
447–450 | It would be better to create the BaseRecordInfo and then move it into the vector, since the constructor will copy all those strings. | |
454 | s/inherit/serialize | |
460 | s/populateParentNamespaces/populateFunctionInfo ? | |
clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp | ||
91 | For clarity, call this something else? Since it already has an X private member. |
Increase version number of clang-doc bitcode.
Rename documentInfo function to shouldSerializeInfo.
In new parseBases a BaseRecordInfo object is created and then added to Bases of main RecordInfo.
Fix comments.
clang-tools-extra/clang-doc/Serialize.cpp | ||
---|---|---|
436 | I got this logic from https://clang.llvm.org/doxygen/CXXInheritance_8cpp_source.html#l00150 so it should probably work as you said, getDecl() always returns a non-null pointer. |
I definitely haven't been particularly good about bumping this, but can you bump it? This is a decently large change.