[cfe-commits] r109757 - /cfe/trunk/lib/Sema/SemaCXXCast.cpp

Douglas Gregor dgregor at apple.com
Thu Jul 29 09:12:45 PDT 2010


Author: dgregor
Date: Thu Jul 29 11:12:45 2010
New Revision: 109757

URL: http://llvm.org/viewvc/llvm-project?rev=109757&view=rev
Log:
When dynamic_cast'ing from a type to itself, fill in the cast kind
with CK_NoOp. Fixes PR7727.

Modified:
    cfe/trunk/lib/Sema/SemaCXXCast.cpp

Modified: cfe/trunk/lib/Sema/SemaCXXCast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXCast.cpp?rev=109757&r1=109756&r2=109757&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXCast.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXCast.cpp Thu Jul 29 11:12:45 2010
@@ -396,6 +396,7 @@
   // 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;
   }
 





More information about the cfe-commits mailing list