[cfe-commits] r137812 - /cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Aug 16 21:22:25 PDT 2011


Author: d0k
Date: Tue Aug 16 23:22:25 2011
New Revision: 137812

URL: http://llvm.org/viewvc/llvm-project?rev=137812&view=rev
Log:
Silence compiler warnings by casting object pointers to function pointers via intptr_t.

This is ugly but ISO C++ doesn't allow direct casts.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp?rev=137812&r1=137811&r2=137812&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp Tue Aug 16 23:22:25 2011
@@ -56,7 +56,8 @@
 
     // Register its checkers.
     RegisterCheckersFn registerPluginCheckers =
-      (RegisterCheckersFn) lib.getAddressOfSymbol("clang_registerCheckers");
+      (RegisterCheckersFn) (intptr_t) lib.getAddressOfSymbol(
+                                                      "clang_registerCheckers");
     if (registerPluginCheckers)
       registerPluginCheckers(*this);
   }





More information about the cfe-commits mailing list