Anonymous enums that are typedef'd should take on the name of the typedef.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | ||
---|---|---|
174–175 | Aren't these two lines supposed to do this? |
clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | ||
---|---|---|
174–175 | Qualified name is never empty, just contains some version of anonymous, whereas getName() is actually empty for anonymous types. The flow is now, try to populate with getName (which is unqualified and puts us in a better spot for the eventual support of c++ and nested types). and if that doesn't work fallback to the qualified name. |
clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | ||
---|---|---|
174–175 | Sorry I meant getTypedefName(Decl), which also tries to get the typedef name for an anonymous tag. Now we have three (two fallbacks) for Enum:
My questions:
|
clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | ||
---|---|---|
174–175 |
|
clang/lib/ExtractAPI/ExtractAPIVisitor.cpp | ||
---|---|---|
174–175 | Ah I see. So before this patch we had getQualifiedNameAsString which would always bypass the following getTypedefName even if it's an anonymous within a typedef. This patch cleared out the logic and ordering.
😅 right, that part was folded in the diff view and I totally forgot we had that there... LGTM. Thanks Daniel! |
Aren't these two lines supposed to do this?