From: Benjamin Kramer Date: Sat, 24 Mar 2012 13:59:42 +0000 (+0000) Subject: Don't cast away constness. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d961ea91e14fdf4047db3e891def9951ee7afde1;p=clang Don't cast away constness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153381 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h index 6bca6411c3..7e665ceda5 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h @@ -90,7 +90,7 @@ public: template class BugReporterVisitorImpl : public BugReporterVisitor { virtual BugReporterVisitor *clone() const { - return new DERIVED(*(DERIVED *)this); + return new DERIVED(*static_cast(this)); } };