[cfe-commits] r153381 - /cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

Benjamin Kramer benny.kra at googlemail.com
Sat Mar 24 06:59:42 PDT 2012


Author: d0k
Date: Sat Mar 24 08:59:42 2012
New Revision: 153381

URL: http://llvm.org/viewvc/llvm-project?rev=153381&view=rev
Log:
Don't cast away constness.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h?rev=153381&r1=153380&r2=153381&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h Sat Mar 24 08:59:42 2012
@@ -90,7 +90,7 @@
 template <class DERIVED>
 class BugReporterVisitorImpl : public BugReporterVisitor {
   virtual BugReporterVisitor *clone() const {
-    return new DERIVED(*(DERIVED *)this);
+    return new DERIVED(*static_cast<const DERIVED *>(this));
   }
 };
 





More information about the cfe-commits mailing list