[clang-tools-extra] [Clangd] [NFC] Fix dereference of null value (PR #159566)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 18 08:35:42 PDT 2025
================
@@ -145,8 +145,11 @@ std::string getQualification(ASTContext &Context,
for (const auto *CurD : llvm::reverse(Parents)) {
if (auto *TD = llvm::dyn_cast<TagDecl>(CurD)) {
QualType T;
- if (const auto *RD = dyn_cast<CXXRecordDecl>(TD);
----------------
zwuis wrote:
I think changing `dyn_cast` to `cast` is better unless a test case causing crash is found.
https://github.com/llvm/llvm-project/pull/159566
More information about the cfe-commits
mailing list