Author: Timm Bäder Date: 2022-11-08T12:47:41+01:00 New Revision: 73ecff23333859ad10163f92e36d1f8588c4d686
URL: https://github.com/llvm/llvm-project/commit/73ecff23333859ad10163f92e36d1f8588c4d686 DIFF: https://github.com/llvm/llvm-project/commit/73ecff23333859ad10163f92e36d1f8588c4d686.diff LOG: [clang][Sema][NFC] Remove two nonsensical dyn_cast_or_null The values used here are never null. Added: Modified: clang/lib/Sema/SemaDeclCXX.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 73603b51de8a8..84d7cf1e5eb40 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -16732,7 +16732,7 @@ static bool UsefulToPrintExpr(const Expr *E) { return false; // -5 is also simple to understand. - if (const auto *UnaryOp = dyn_cast_or_null<UnaryOperator>(E)) + if (const auto *UnaryOp = dyn_cast<UnaryOperator>(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); // Ignore nested binary operators. This could be a FIXME for improvements @@ -16746,7 +16746,7 @@ static bool UsefulToPrintExpr(const Expr *E) { /// Try to print more useful information about a failed static_assert /// with expression \E void Sema::DiagnoseStaticAssertDetails(const Expr *E) { - if (const auto *Op = dyn_cast_or_null<BinaryOperator>(E)) { + if (const auto *Op = dyn_cast<BinaryOperator>(E)) { const Expr *LHS = Op->getLHS()->IgnoreParenImpCasts(); const Expr *RHS = Op->getRHS()->IgnoreParenImpCasts(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits