diff options
| author | Paul Kirth <paulkirth@google.com> | 2024-12-17 14:04:37 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-17 14:04:37 -0800 |
| commit | b575ce587d323dc54d3efc7ffdcc2c387d8f7073 (patch) | |
| tree | ed2006d4fdab9d272c1ac772a903c3825d573c4b | |
| parent | d2603503297f998cab285c84b0ddef7b345ce7f6 (diff) | |
[clang-doc][NFC] Use isa over dyn_cast (#120309)users/ilovepi/spr/main.clang-docnfc-use-isa-over-dyn_cast
These call sites don't need the cast, as they don't use the value.
| -rw-r--r-- | clang-tools-extra/clang-doc/Serialize.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-doc/Serialize.cpp b/clang-tools-extra/clang-doc/Serialize.cpp index b9db78cf7d68..34b9121d3154 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; |
