Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions clang/lib/AST/Expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3263,8 +3263,8 @@ bool Expr::isTemporaryObject(ASTContext &C, const CXXRecordDecl *TempTy) const {
// refer to temporaries of that type:

// - implicit derived-to-base conversions
if (isa<ImplicitCastExpr>(E)) {
switch (cast<ImplicitCastExpr>(E)->getCastKind()) {
if (const auto *ICE = dyn_cast<ImplicitCastExpr>(E)) {
switch (ICE->getCastKind()) {
case CK_DerivedToBase:
case CK_UncheckedDerivedToBase:
return false;
Expand All @@ -3277,7 +3277,7 @@ bool Expr::isTemporaryObject(ASTContext &C, const CXXRecordDecl *TempTy) const {
if (isa<MemberExpr>(E))
return false;

if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E))
if (const auto *BO = dyn_cast<BinaryOperator>(E))
if (BO->isPtrMemOp())
return false;

Expand Down