Ruturaj4 marked 2 inline comments as done. Ruturaj4 added inline comments.
================ Comment at: clang/lib/ExtractAPI/ExtractAPIVisitor.cpp:347 + if (TagTy->getDecl()->isStruct()) { + for (const auto &Struct : API.getStructs()) { + if (Decl->getName() == Struct.second.get()->Name) { ---------------- dang wrote: > What happens if the visitation hasn't already encountered the definition of > the struct? We wouldn't find it in the the APISet and this doesn't work. The > approach I would suggest here is to generate the fragments for the underlying > Decl directly. For example what happens for the following code: > > ```c > struct Foo; > typedef struct Foo TypedefedFoo; > struct Foo { > int bar; > }; > ``` Actually added an example for this. Our code works fine. Please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146385/new/ https://reviews.llvm.org/D146385 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits