[cfe-commits] r56403 - /cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp

Ted Kremenek kremenek at apple.com
Sun Sep 21 12:01:40 PDT 2008


Author: kremenek
Date: Sun Sep 21 14:01:39 2008
New Revision: 56403

URL: http://llvm.org/viewvc/llvm-project?rev=56403&view=rev
Log:
The checks in BasicObjCFoundationChecks now have a category: "API Misuse (Apple)"

Modified:
    cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp

Modified: cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp?rev=56403&r1=56402&r2=56403&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicObjCFoundationChecks.cpp Sun Sep 21 14:01:39 2008
@@ -58,14 +58,21 @@
 }
 
 namespace {
+
+class VISIBILITY_HIDDEN APIMisuse : public BugTypeCacheLocation {
+public:  
+  const char* getCategory() const {
+    return "API Misuse (Apple)";
+  }
+};
   
-class VISIBILITY_HIDDEN NilArg : public BugTypeCacheLocation {
+class VISIBILITY_HIDDEN NilArg : public APIMisuse {
 public:
   virtual ~NilArg() {}
   
   virtual const char* getName() const {
     return "nil argument";
-  }
+  }  
   
   class Report : public BugReport {
     std::string Msg;
@@ -300,7 +307,7 @@
 
 namespace {
   
-class VISIBILITY_HIDDEN BadCFNumberCreate : public BugTypeCacheLocation {
+class VISIBILITY_HIDDEN BadCFNumberCreate : public APIMisuse{
 public:
   typedef std::vector<BugReport*> AllErrorsTy;
   AllErrorsTy AllErrors;





More information about the cfe-commits mailing list