aaron.ballman added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4640 /*D=*/nullptr); - LT = getLLVMLinkageVarDefinition(cast<VarDecl>(GD.getDecl()), - D->getType().isConstQualified()); + if (isa<VarDecl>(GD.getDecl())) + LT = getLLVMLinkageVarDefinition(cast<VarDecl>(GD.getDecl()), ---------------- Rather than `isa<>` followed by `cast<>`, this should be using `dyn_cast<>`. e.g., ``` if (const auto *VD = dyn_cast<VarDecl>(GD.getDecl())) ... else ... ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90073/new/ https://reviews.llvm.org/D90073 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits