[clang] [clang][ExtractAPI] Generate subheading for typedef'd anonymous types (PR #110689)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 1 10:29:45 PDT 2024


================
@@ -1621,6 +1621,9 @@ DeclarationFragmentsBuilder::getSubHeading(const NamedDecl *Decl) {
              cast<CXXMethodDecl>(Decl)->isOverloadedOperator()) {
     Fragments.append(Decl->getNameAsString(),
                      DeclarationFragments::FragmentKind::Identifier);
+  } else if (dyn_cast<TagDecl>(Decl) &&
----------------
QuietMisdreavus wrote:

Could this use `isa<TagDecl>` instead? The extraneous pointer cast is probably not a big deal in the broad scheme, but using `dyn_cast` as a boolean check just feels weird to me.

https://github.com/llvm/llvm-project/pull/110689


More information about the cfe-commits mailing list