Skip to content

[clang-doc][NFC] Use isa<> over dyn_cast#136445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

ilovepi
Copy link
Contributor

No description provided.

@ilovepiGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

@llvm/pr-subscribers-clang-tools-extra

Author: Paul Kirth (ilovepi)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/136445.diff

1 Files Affected:

  • (modified) clang-tools-extra/clang-doc/Serialize.cpp (+2-2)
diff --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp index 1dcccf3c3c2ab..bc31621f4a92e 100644 --- a/clang-tools-extra/clang-doc/Serialize.cpp+++ b/clang-tools-extra/clang-doc/Serialize.cpp@@ -246,9 +246,9 @@ static TypeInfo getTypeInfoForType(const QualType &T, return TypeInfo(Reference(SymbolID(), T.getAsString(Policy))); InfoType IT; - if (dyn_cast<EnumDecl>(TD)) {+ if (isa<EnumDecl>(TD)) { IT = InfoType::IT_enum; - } else if (dyn_cast<RecordDecl>(TD)) {+ } else if (isa<RecordDecl>(TD)) { IT = InfoType::IT_record; } else { IT = InfoType::IT_default; 
@ilovepiGraphite App
Copy link
ContributorAuthor

ilovepi commented Apr 22, 2025

Merge activity

  • Apr 22, 3:22 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Apr 22, 3:23 PM EDT: A user merged this pull request with Graphite.
@ilovepiilovepi merged commit 11d5c4d into mainApr 22, 2025
13 checks passed
@ilovepiilovepi deleted the users/ilovepi/clang-doc-tidy-isa branch April 22, 2025 19:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
@ilovepi@llvmbot@petrhosek
close