blob: 679c6dc1df2db9b5e536009c30942124f922a5b8 [file] [log] [blame]
Ted Kremenek52755612008-03-27 17:17:22 +00001//== BasicObjCFoundationChecks.h - Simple Apple-Foundation checks -*- C++ -*--//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines BasicObjCFoundationChecks, a class that encapsulates
11// a set of simple checks to run on Objective-C code using Apple's Foundation
12// classes.
13//
14//===----------------------------------------------------------------------===//
15
Ted Kremenek52755612008-03-27 17:17:22 +000016#ifndef LLVM_CLANG_ANALYSIS_BASICOBJCFOUNDATIONCHECKS
17#define LLVM_CLANG_ANALYSIS_BASICOBJCFOUNDATIONCHECKS
18
19namespace clang {
Mike Stump1eb44332009-09-09 15:08:12 +000020
Ted Kremenek52755612008-03-27 17:17:22 +000021class ASTContext;
Ted Kremenekcf118d42009-02-04 23:49:09 +000022class BugReporter;
Benjamin Kramer0c5db872009-11-28 09:41:31 +000023class Decl;
Ted Kremenekcf118d42009-02-04 23:49:09 +000024class GRExprEngine;
Benjamin Kramer0c5db872009-11-28 09:41:31 +000025class GRSimpleAPICheck;
Mike Stump1eb44332009-09-09 15:08:12 +000026
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000027GRSimpleAPICheck *CreateBasicObjCFoundationChecks(ASTContext& Ctx,
Ted Kremenekcf118d42009-02-04 23:49:09 +000028 BugReporter& BR);
Mike Stump1eb44332009-09-09 15:08:12 +000029
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000030GRSimpleAPICheck *CreateAuditCFNumberCreate(ASTContext& Ctx,
Ted Kremenekcf118d42009-02-04 23:49:09 +000031 BugReporter& BR);
Mike Stump1eb44332009-09-09 15:08:12 +000032
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000033GRSimpleAPICheck *CreateAuditCFRetainRelease(ASTContext& Ctx,
34 BugReporter& BR);
Mike Stump1eb44332009-09-09 15:08:12 +000035
Zhongxing Xu5ab128b2009-08-21 02:18:44 +000036void RegisterNSErrorChecks(BugReporter& BR, GRExprEngine &Eng, const Decl &D);
Ted Kremenek54cb7cc2009-11-03 08:03:59 +000037void RegisterNSAutoreleasePoolChecks(GRExprEngine &Eng);
Mike Stump1eb44332009-09-09 15:08:12 +000038
Ted Kremenek52755612008-03-27 17:17:22 +000039} // end clang namespace
40
41#endif