mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 00:46:45 +08:00
When dynamic_cast'ing from a type to itself, fill in the cast kind
with CK_NoOp. Fixes PR7727. llvm-svn: 109757
This commit is contained in:
@@ -396,6 +396,7 @@ CheckDynamicCast(Sema &Self, Expr *&SrcExpr, QualType DestType,
|
||||
// C++ 5.2.7p3: If the type of v is the same as the required result type,
|
||||
// [except for cv].
|
||||
if (DestRecord == SrcRecord) {
|
||||
Kind = CastExpr::CK_NoOp;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user