]> granicus.if.org Git - clang/commitdiff
StaticAnalyzer/Core: fix MSVC build
authorDylan Noblesmith <nobled@dreamwidth.org>
Mon, 13 Feb 2012 14:22:35 +0000 (14:22 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Mon, 13 Feb 2012 14:22:35 +0000 (14:22 +0000)
Fix build breakage from r150378: MSVC only allows taking the
address of a member function using the &ClassName::Function
syntax.# It was giving

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150387 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/CheckerRegistry.h

index b59c14d32f9150489a992f2df1177f353cb5239a..1452d45073aacded079a1f0988f62e6bfabddf1c 100644 (file)
@@ -107,7 +107,9 @@ public:
   /// 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