Skip to content

Conversation

@ilovepi
Copy link
Contributor

@ilovepi ilovepi commented Dec 17, 2024

These call sites don't need the cast, as they don't use the value.

Created using spr 1.3.6-beta.1
@llvmbot
Copy link
Member

llvmbot commented Dec 17, 2024

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

Author: Paul Kirth (ilovepi)

Changes

These call sites don't need the cast, as they don't use the value.


Full diff: https://github.com/llvm/llvm-project/pull/120309.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 b9db78cf7d688f..34b9121d3154ed 100644
--- a/clang-tools-extra/clang-doc/Serialize.cpp
+++ b/clang-tools-extra/clang-doc/Serialize.cpp
@@ -242,9 +242,9 @@ TypeInfo getTypeInfoForType(const QualType &T) {
     return TypeInfo(Reference(SymbolID(), T.getAsString()));
 
   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;

@ilovepi ilovepi merged commit b575ce5 into users/ilovepi/spr/main.clang-docnfc-use-isa-over-dyn_cast Dec 17, 2024
7 of 8 checks passed
@ilovepi ilovepi deleted the users/ilovepi/spr/clang-docnfc-use-isa-over-dyn_cast branch December 17, 2024 22:04
@ilovepi ilovepi restored the users/ilovepi/spr/clang-docnfc-use-isa-over-dyn_cast branch December 17, 2024 22:05
@ilovepi ilovepi deleted the users/ilovepi/spr/clang-docnfc-use-isa-over-dyn_cast branch December 17, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants