Ted Kremenek
1d3c797c90
Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead of references, because they can both fail
...
on functions we cannot construct full CFGs for yet.
llvm-svn: 53081
2008-07-03 05:26:14 +00:00
Ted Kremenek
0e7d25233e
Added static analysis check to see if a subclass of NSObject implements -dealloc, and whether or not that implementation calls [super dealloc].
...
llvm-svn: 53075
2008-07-03 04:29:21 +00:00
Ted Kremenek
c7efb536d5
Unify the code path for the Dead Stores checker to always use the BugReporter interface.
...
llvm-svn: 53054
2008-07-02 23:16:33 +00:00
Ted Kremenek
b1d0118a1a
Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
...
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.
llvm-svn: 53048
2008-07-02 21:24:01 +00:00
Ted Kremenek
125d4a3b2d
GRExprEngine now expects the LiveVariables information to be provided by its creator.
...
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.
llvm-svn: 53046
2008-07-02 20:13:38 +00:00
Ted Kremenek
d8ca1f6dd9
Added version of CheckDeadStores that accepts a client-provided LiveVariables object.
...
Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager.
llvm-svn: 53043
2008-07-02 18:39:20 +00:00
Ted Kremenek
f992cfb4ab
Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.
...
Renamed -dump-cfg to -cfg-dump, and -view-cfg to -cfg-view. This naming better matches the same options for asts (e.g. -ast-dump).
llvm-svn: 53041
2008-07-02 18:23:21 +00:00
Ted Kremenek
bdbe6130f4
Move -dump-live-variables logic to AnalysisConsumer.
...
llvm-svn: 53039
2008-07-02 18:11:29 +00:00
Ted Kremenek
71ac83246f
Migrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.
...
Remove CheckerConsumer.
llvm-svn: 53029
2008-07-02 16:49:11 +00:00
Ted Kremenek
becec2cbbc
Move logic for "-checker-simple" to the new AnalysisConsumer interface.
...
llvm-svn: 53028
2008-07-02 16:35:50 +00:00
Ted Kremenek
8e631a0267
Migrated driver logic for running the CF retain/release checker over to the new AnalysisConsumer interface.
...
llvm-svn: 53002
2008-07-02 00:44:58 +00:00
Ted Kremenek
f0413bfcda
Added AnalysisConsumer, a meta-level ASTConsumer class to drive various
...
analyses. This potentially is the primordial origins of a Clang-equivalent
"PassManager".
The new AnalysisConsumer interface allows multiple analyses to be run from a
single invocation of Clang.
Migrated the logic of "-warn-dead-stores" and "-warn-uninit-values" to use the
new AnalysisConsumer interface. The new interface results in a significant code
reduction to incorporate an analysis into the Driver.
Updated a test case to (correctly) acknowledge that it contains a dead store
(this check wasn't being performed because it was previously masked by
-warn-uninit-values).
llvm-svn: 52996
2008-07-02 00:03:09 +00:00