summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCXXCast.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-29 16:12:45 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-29 16:12:45 +0000
commite9bf2d159c8dc747becc32007b8c222af9f7d425 (patch)
tree34349a174deab5f385a6a6cf9d9c56d7dbe00901 /clang/lib/Sema/SemaCXXCast.cpp
parent029fd693cf69dfe0bdf092778f085b3343c8964f (diff)
downloadbcm5719-llvm-e9bf2d159c8dc747becc32007b8c222af9f7d425.tar.gz
bcm5719-llvm-e9bf2d159c8dc747becc32007b8c222af9f7d425.zip
When dynamic_cast'ing from a type to itself, fill in the cast kind
with CK_NoOp. Fixes PR7727. llvm-svn: 109757
Diffstat (limited to 'clang/lib/Sema/SemaCXXCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCXXCast.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp
index 29e9051082d..519d5692a3c 100644
--- a/clang/lib/Sema/SemaCXXCast.cpp
+++ b/clang/lib/Sema/SemaCXXCast.cpp
@@ -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;
}
OpenPOWER on IntegriCloud