forked from OSchip/llvm-project
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:
parent
029fd693cf
commit
e9bf2d159c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue