[cfe-commits] r150387 - /cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerRegistry.h

Dylan Noblesmith nobled at dreamwidth.org
Mon Feb 13 06:22:35 PST 2012


Author: nobled
Date: Mon Feb 13 08:22:35 2012
New Revision: 150387

URL: http://llvm.org/viewvc/llvm-project?rev=150387&view=rev
Log:
StaticAnalyzer/Core: fix MSVC build

Fix build breakage from r150378: MSVC only allows taking the
address of a member function using the &ClassName::Function
syntax.# It was giving

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerRegistry.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerRegistry.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerRegistry.h?rev=150387&r1=150386&r2=150387&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerRegistry.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/CheckerRegistry.h Mon Feb 13 08:22:35 2012
@@ -107,7 +107,9 @@
   /// checker does not require any custom initialization.
   template <class T>
   void addChecker(StringRef fullName, StringRef desc) {
-    addChecker(&initializeManager<T>, fullName, desc);
+    // Avoid MSVC's Compiler Error C2276:
+    // http://msdn.microsoft.com/en-us/library/850cstw1(v=VS.80).aspx
+    addChecker(&CheckerRegistry::initializeManager<T>, fullName, desc);
   }
 
   /// Initializes a CheckerManager by calling the initialization functions for





More information about the cfe-commits mailing list