Commit Graph

31 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 68ed625bd3 [analyzer] Migrate VLASizeChecker to CheckerV2.
llvm-svn: 126621
2011-02-28 01:27:54 +00:00
Argyrios Kyrtzidis ae468f77fa [analyzer] Migrate DivZeroChecker to CheckerV2.
llvm-svn: 126620
2011-02-28 01:27:50 +00:00
Argyrios Kyrtzidis 4dc7fb37cb [analyzer] Migrate ReturnUndefChecker to CheckerV2.
llvm-svn: 126619
2011-02-28 01:27:46 +00:00
Argyrios Kyrtzidis da6c7568e2 [analyzer] Migrate UndefinedArraySubscriptChecker to CheckerV2.
llvm-svn: 126618
2011-02-28 01:27:41 +00:00
Argyrios Kyrtzidis 098874a2f8 [analyzer] Migrate UndefinedAssignmentChecker to CheckerV2.
llvm-svn: 126617
2011-02-28 01:27:37 +00:00
Argyrios Kyrtzidis 753b3ca32f [analyzer] Migrate UndefBranchChecker to CheckerV2.
llvm-svn: 126616
2011-02-28 01:27:33 +00:00
Argyrios Kyrtzidis 60b6da721f [analyzer] Migrate UndefCapturedBlockVarChecker to CheckerV2.
llvm-svn: 126615
2011-02-28 01:27:26 +00:00
Argyrios Kyrtzidis d4d3cee6e4 [analyzer] Migrate UndefResultChecker to CheckerV2.
llvm-svn: 126614
2011-02-28 01:27:22 +00:00
Argyrios Kyrtzidis 142dbbfcd8 [analyzer] Migrate NoReturnFunctionChecker to CheckerV2.
llvm-svn: 126613
2011-02-28 01:27:17 +00:00
Argyrios Kyrtzidis 3e7ab19863 [analyzer] Move the DeadStores checker out of the 'core' package.
-Now it gets enabled with '-analyzer-checker=DeadStores'.
-The driver passes the above flag by default.

llvm-svn: 126612
2011-02-28 01:27:12 +00:00
Argyrios Kyrtzidis f3ed8b631d [analyzer] Migrate BuiltinFunctionChecker to CheckerV2.
llvm-svn: 126611
2011-02-28 01:27:07 +00:00
Argyrios Kyrtzidis b2cf708395 [analyzer] Migrate OSAtomicChecker to CheckerV2.
llvm-svn: 126610
2011-02-28 01:27:02 +00:00
Argyrios Kyrtzidis 0a9ce3ec8f [analyzer] Migrate ArrayBoundCheckerV2 to CheckerV2.
Turns -analyzer-check-buffer-overflows into -analyzer-checker=core.experimental.Overflow

llvm-svn: 126609
2011-02-28 01:26:57 +00:00
Argyrios Kyrtzidis 560bbb1241 [analyzer] Turn -analyzer-stats into -analyzer-checker=debug.Stats
llvm-svn: 126608
2011-02-28 01:26:50 +00:00
Argyrios Kyrtzidis 183f0fb4cf [analyzer] Migrate MallocChecker to CheckerV2.
llvm-svn: 126606
2011-02-28 01:26:35 +00:00
Ted Kremenek e925322f41 Update test cases.
llvm-svn: 126523
2011-02-25 22:19:14 +00:00
Ted Kremenek 5eb4b60734 Tidy up help text in Checkers.td, and rename StackAddrLeakChecker to StackAddrEscapeChecker.
llvm-svn: 126522
2011-02-25 22:00:43 +00:00
Argyrios Kyrtzidis 51695bbb0a [analyzer] Allow a checker to be hidden even if its package is hidden & enabled.
For example, if 'core.experimental.UnreachableCode' is hidden, it should not be enabled with 'core.experimental'.
Note that this requires llvm commit r126436.

llvm-svn: 126439
2011-02-24 21:42:52 +00:00
Argyrios Kyrtzidis 8b08906411 [analyzer] Migrate CastSizeChecker to CheckerV2.
llvm-svn: 126438
2011-02-24 21:42:49 +00:00
Argyrios Kyrtzidis dd407f423b [analyzer] Migrate ArrayBoundChecker to CheckerV2.
llvm-svn: 126371
2011-02-24 08:42:12 +00:00
Argyrios Kyrtzidis 7bc0141043 [analyzer] Migrate ReturnPointerRangeChecker to CheckerV2.
llvm-svn: 126369
2011-02-24 08:41:57 +00:00
Argyrios Kyrtzidis 57d736fd46 [analyzer] Use the new registration mechanism for the debugging info "checks".
The relative checker package is 'debug':

'-dump-live-variables' is replaced by '-analyzer-checker=debug.DumpLiveVars'
'-cfg-view' is replaced by '-analyzer-checker=debug.ViewCFG'
'-cfg-dump' is replaced by '-analyzer-checker=debug.DumpCFG'

llvm-svn: 125780
2011-02-17 21:39:39 +00:00
Argyrios Kyrtzidis af45aca670 [analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:
DeadStoresChecker
  ObjCMethSigsChecker
  ObjCUnusedIvarsChecker
  SizeofPointerChecker
  ObjCDeallocChecker
  SecuritySyntaxChecker

llvm-svn: 125779
2011-02-17 21:39:33 +00:00
Argyrios Kyrtzidis 24ffc08f39 [analyzer]
-Introduce CheckerV2, a set of templates for convenient declaration & registration of checkers.
 Currently useful just for checkers working on the AST not the path-sensitive ones.
-Enhance CheckerManager to actually collect the checkers and turn it into the entry point for
 running the checkers.
-Use the new mechanism for the LLVMConventionsChecker.

llvm-svn: 125778
2011-02-17 21:39:24 +00:00
Argyrios Kyrtzidis 9d4d4f9104 [analyzer] Use the new registration mechanism on the apple checkers:
NilArgChecker
  CFNumberCreateChecker
  NSAutoreleasePoolChecker
  CFRetainReleaseChecker
  ClassReleaseChecker

llvm-svn: 125636
2011-02-16 01:40:52 +00:00
Argyrios Kyrtzidis a9215281de [analyzer] Use the new registration mechanism on some of the experimental internal checkers:
CastToStructChecker
  FixedAddressChecker
  PointerArithChecker
  PointerSubChecker

llvm-svn: 125612
2011-02-15 22:55:20 +00:00
Argyrios Kyrtzidis b2400924d9 [analyzer] Use the new registration mechanism on the IdempotentOperationChecker.
llvm-svn: 125611
2011-02-15 22:55:14 +00:00
Argyrios Kyrtzidis 2d3905ffac [analyzer] Use the new registration mechanism on some of the experimental checks. These are:
CStringChecker
   ChrootChecker
   MallocChecker
   PthreadLockChecker
   StreamChecker
   UnreachableCodeChecker

MallocChecker creates implicit dependencies between checkers and needs to be handled differently.

llvm-svn: 125598
2011-02-15 21:25:03 +00:00
Argyrios Kyrtzidis 4e52527c28 [analyzer] Reflect changes for tablegen'ing the checkers.
-Update tablegen files for checkers, use the tablegen class name for the checker class name.
-Update ClangSACheckersProvider to not look into hidden checker packages.

llvm-svn: 125560
2011-02-15 07:42:38 +00:00
Argyrios Kyrtzidis a6d04d541d [analyzer] Use the new registration mechanism on some of the internal checks. These are:
StackAddrLeakChecker
ObjCAtSyncChecker
UnixAPIChecker
MacOSXAPIChecker

The rest have/create implicit dependencies between checkers and need to be handled differently.

llvm-svn: 125559
2011-02-15 07:42:33 +00:00
Argyrios Kyrtzidis 556c45e9c5 [analyzer] Overhauling of the checker registration mechanism.
-Checkers will be defined in the tablegen file 'Checkers.td'.
-Apart from checkers, we can define checker "packages" that will contain a collection of checkers.
-Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g:
	Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker:
	-analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit
-Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and
 register them with the CheckerManager which will be the entry point for all checker-related functionality.

Currently only the self-initialization checker takes advantage of the new mechanism.

llvm-svn: 125503
2011-02-14 18:13:31 +00:00