Commit Graph

5418 Commits

Author SHA1 Message Date
Ted Kremenek 9c75ea62d7 Have ccc-analyzer skip any files with an unknown (or absent) extension.
llvm-svn: 53114
2008-07-03 22:24:10 +00:00
Chris Lattner 4cab581bc0 add c++ status to sidebar
llvm-svn: 53107
2008-07-03 17:43:22 +00:00
Ted Kremenek 38b1e57a4d Updated latest checker build.
llvm-svn: 53103
2008-07-03 16:26:26 +00:00
Ted Kremenek 68b117fca4 Skip the "-dealloc" check if a ObjC class contains no ivars.
llvm-svn: 53100
2008-07-03 15:37:02 +00:00
Ted Kremenek b23c3aaf7a Added an "ivar_empty" method to ObjCInterfaceDecl.
llvm-svn: 53099
2008-07-03 15:30:49 +00:00
Ted Kremenek e66ca6f35a For the -dealloc checker, check the LangOptions to determine whether or not the code is compiled with GC.
llvm-svn: 53098
2008-07-03 14:35:01 +00:00
Argyrios Kyrtzidis 5c48a70dad -Added bool feature.
-Set "Named Casts" feature to partial parser/sema support because reinterpret_cast is not properly implemented.
-Removed "Virtual functions" feature because it is already covered by "Class definitions".
-Removed "Templates" because we should either list *all* missing/supported features or just list the features with some support. Mentioning just a few missing features without listing all of them makes little sense.

llvm-svn: 53095
2008-07-03 08:32:59 +00:00
Argyrios Kyrtzidis f5bfb06b85 -Change slightly the link to cxx_status.html of the home page.
-Add a link to cxx_status.html from get_involved.html/"Open Projects".

llvm-svn: 53094
2008-07-03 08:21:51 +00:00
Ted Kremenek f39614bfd0 Updated latest checker build.
llvm-svn: 53084
2008-07-03 05:33:14 +00:00
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 590afde872 Updated latest checker build.
llvm-svn: 53080
2008-07-03 04:47:54 +00:00
Ted Kremenek ff7f2e76bf Update Xcode project.
llvm-svn: 53076
2008-07-03 04:30:48 +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
Anders Carlsson 7a241baf2f Shuffle things around in preparation for integrating Eli's constant evaluator.
llvm-svn: 53074
2008-07-03 04:20:39 +00:00
Anders Carlsson ac1d1d1c34 Make APValue an APSInt.
llvm-svn: 53072
2008-07-03 04:00:59 +00:00
Chris Lattner 3f26dc0bf6 new testcase
llvm-svn: 53071
2008-07-03 03:53:40 +00:00
Chris Lattner 1cb0e61e98 Fix PR2252: don't warn on negating an unsigned value ever, and don't emit
'integer constant is so large that it is unsigned' warning for hex literals.

llvm-svn: 53070
2008-07-03 03:47:30 +00:00
Chris Lattner 9ff58d7caf Fix PR2020 by recovering by defining an anonymous enum, instead of recovering
by filling in the body of a union with enum constants.

llvm-svn: 53069
2008-07-03 03:30:58 +00:00
Ted Kremenek 80025c257f Update test case with new clang arguments.
llvm-svn: 53056
2008-07-02 23:18:57 +00:00
Ted Kremenek e6b2fa5029 Update test case: simply running "clang -checker-simple" doesn't invoke the dead store checker anymore. We need "-warn-dead-stores" as well.
llvm-svn: 53055
2008-07-02 23:18:22 +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 f1f17555bd ccc-analyzer now dispatches the options "-checker-cfref" and "-warn-dead-stores" to clang instead of just "-checker-cfref".
llvm-svn: 53053
2008-07-02 23:16:10 +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 c3b30340d9 Added method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST when all of the ASTs in a translation unit have been built.
llvm-svn: 53042
2008-07-02 18:32:45 +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
Chris Lattner 5cc931d409 add a description of what sema and parser mean, add C++ style casts.
llvm-svn: 53027
2008-07-02 16:28:43 +00:00
Ted Kremenek 494e98d0e5 Fix typo in test case.
llvm-svn: 53024
2008-07-02 15:28:06 +00:00
Argyrios Kyrtzidis 1b1a711eb3 Add note that most of C++ is not supported.
llvm-svn: 53023
2008-07-02 15:10:46 +00:00
Argyrios Kyrtzidis c8619b5b15 Set CSS defaults for tables.
llvm-svn: 53022
2008-07-02 14:42:28 +00:00
Argyrios Kyrtzidis fd2012b04d Drop 'C++' from the features; suggestion by Holger Schurig.
llvm-svn: 53020
2008-07-02 14:16:29 +00:00
Argyrios Kyrtzidis d2082befe5 Fix the page title.
llvm-svn: 53017
2008-07-02 13:44:11 +00:00
Gabor Greif dedda503cb minor tweaks, escape < and >
llvm-svn: 53016
2008-07-02 12:34:47 +00:00
Gabor Greif a5cb073c5c add two popular c++ features
llvm-svn: 53015
2008-07-02 12:31:13 +00:00
Gabor Greif 731d70b2d6 add c++ status link
llvm-svn: 53014
2008-07-02 12:18:17 +00:00
Argyrios Kyrtzidis ac1c5f925e Add a C++ status report page.
llvm-svn: 53013
2008-07-02 11:38:59 +00:00
Ted Kremenek 410d32bfec Add DeclCXX.[h.cpp] to clangAST.vcproj
llvm-svn: 53004
2008-07-02 00:57:42 +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 0a7fd7d56c Added AnalysisConsumer.[cpp,h] to clangDriver.vcproj.
Added CXXFieldCollector.h to clangSema.vcproj.

llvm-svn: 52999
2008-07-02 00:16:24 +00:00
Ted Kremenek e6cc6bb5b3 Updated Xcode project with new files in the Driver: AnalysisConsumer.[h,cpp]
llvm-svn: 52997
2008-07-02 00:03:52 +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
Ted Kremenek 5f06a935a3 Added reference count checker test case.
llvm-svn: 52993
2008-07-01 23:29:51 +00:00
Ted Kremenek 3b5ea90dc1 Updated latest checker build.
llvm-svn: 52991
2008-07-01 23:15:51 +00:00
Ted Kremenek ab54e51b38 Unlike NSWindow objects, NSPanel objects initially do not have self-ownership.
llvm-svn: 52963
2008-07-01 17:21:27 +00:00
Argyrios Kyrtzidis 2a40249b65 Update some comments.
llvm-svn: 52957
2008-07-01 11:22:40 +00:00
Argyrios Kyrtzidis ed9834272f Add Sema support for C++ classes.
llvm-svn: 52956
2008-07-01 10:37:29 +00:00