]> granicus.if.org Git - clang/commitdiff
Don't cast away constness.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 24 Mar 2012 13:59:42 +0000 (13:59 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 24 Mar 2012 13:59:42 +0000 (13:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153381 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

index 6bca6411c30da47df7ac21ffdba47decd6fc19d2..7e665ceda54b4a7c8f72ea0a87fe18d17d218004 100644 (file)
@@ -90,7 +90,7 @@ public:
 template <class DERIVED>
 class BugReporterVisitorImpl : public BugReporterVisitor {
   virtual BugReporterVisitor *clone() const {
-    return new DERIVED(*(DERIVED *)this);
+    return new DERIVED(*static_cast<const DERIVED *>(this));
   }
 };