llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Steven Perron (s-perron) <details> <summary>Changes</summary> In a case statement for Type::HLSLInlineSpirv, the first statment returns, and the remaining statement are never executed. This removes the dead code. https://github.com/llvm/llvm-project/pull/134034/files/7d8e36944370bc50bd74ce6254f93649bc1f35a8#r2166484730 --- Full diff: https://github.com/llvm/llvm-project/pull/146365.diff 1 Files Affected: - (modified) clang/lib/AST/Type.cpp (-9) ``````````diff diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 2c1158e8f9b9a..e5a1ab2ff8906 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -4870,15 +4870,6 @@ LinkageInfo LinkageComputer::computeTypeLinkageInfo(const Type *T) { ->getCanonicalTypeInternal()); case Type::HLSLInlineSpirv: return LinkageInfo::external(); - { - const auto *ST = cast<HLSLInlineSpirvType>(T); - LinkageInfo LV = LinkageInfo::external(); - for (auto &Operand : ST->getOperands()) { - if (Operand.isConstant() || Operand.isType()) - LV.merge(computeTypeLinkageInfo(Operand.getResultType())); - } - return LV; - } } llvm_unreachable("unhandled type class"); `````````` </details> https://github.com/llvm/llvm-project/pull/146365 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits