summaryrefslogtreecommitdiffstats
path: root/clang/Driver/ASTConsumers.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Migrated driver logic for running the CF retain/release checker over to the ↵Ted Kremenek2008-07-021-52/+0
| | | | | | new AnalysisConsumer interface. llvm-svn: 53002
* Added AnalysisConsumer, a meta-level ASTConsumer class to drive variousTed Kremenek2008-07-021-52/+0
| | | | | | | | | | | | | | | | | | 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
* Implement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!Chris Lattner2008-06-211-2/+9
| | | | llvm-svn: 52598
* Updated call to dead stores to use proper arguments.Ted Kremenek2008-06-201-1/+3
| | | | llvm-svn: 52560
* Get -serialize working again, plus a bit of minor cleanup.Eli Friedman2008-06-091-21/+10
| | | | llvm-svn: 52152
* Moved LangOptions from TranslationUnit to ASTContext. This induced a ↵Ted Kremenek2008-06-041-13/+8
| | | | | | variety of cleanups in some ASTConsumers. llvm-svn: 51943
* Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass aTed Kremenek2008-05-311-3/+2
| | | | | | | | | | | TranslationUnit object instead of an ASTContext. By default it calls Initialize(ASTConstext& Context) (to match with the current interface used by most ASTConsumers). Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit to not free its Decls. This is a workaround for: <rdar://problem/5966749> llvm-svn: 51825
* Fix crash with -serialize (reported to cfe-dev). The issue was Eli Friedman2008-05-301-0/+1
| | | | | | | | | essentially that we were destroying the declarations twice. (Note that we don't use -serialize directly in the testsuite, only SerializeTest.) llvm-svn: 51768
* Make sure method definitions get output with -ast-dump.Steve Naroff2008-05-231-0/+5
| | | | llvm-svn: 51494
* This patch introduces declaration of getter methods for ObjC2'sFariborz Jahanian2008-05-071-4/+4
| | | | | | | properties. Couple of property tests will fail with this patch. Will fix them next. llvm-svn: 50818
* Print ObjC methods of ObjC classes.Fariborz Jahanian2008-05-061-0/+8
| | | | llvm-svn: 50779
* Patch to refactor setter/getter names of property attributes into SelectorFariborz Jahanian2008-05-061-2/+2
| | | | | | | (was IdentifierInfo * before). This will make method declartations whole lot easier. llvm-svn: 50747
* percolate @optional/@required protocols down to ASTs forFariborz Jahanian2008-05-051-1/+5
| | | | | | properties declared in the protocol. llvm-svn: 50662
* When running the reference count checker twice (GC and non-GC mode), only emitTed Kremenek2008-05-021-4/+4
| | | | | | basic warnings (dead stores, null dereferences) on the first pass. llvm-svn: 50584
* added preliminary diagnostics in scan-build results to denote whetherTed Kremenek2008-04-301-4/+4
| | | | | | a CF memory leak occurred with GC enabled, etc. llvm-svn: 50507
* Provide the option to run the CF-retain checker in GC enabled mode.Ted Kremenek2008-04-291-23/+48
| | | | | | The transfer functions for the checker don't do anything special yet in GC mode. llvm-svn: 50394
* TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objectsTed Kremenek2008-04-231-7/+15
| | | | | | | | | | | | | | | | when it is constructed via deserialization. This is done by recording a flag indicating that this is the case, and it deletes these objects by getting the references stored in the ASTContext object. This fixes some memory leaks that occurs when we deserialize translation units from bitcode files. The rationale between having TranslationUnit sometimes own these objects and sometimes not is that a TranslationUnit object can be constructed from state generated by the parser (Preprocessor; semantic analyzer, etc.), and thus in these cases won't own the IdentifierTable or Selectors, etc. During deserialization, there is no Preprocessor, so somebody needs to own these objects in order for them to be properly reclaimed. llvm-svn: 50149
* Patch to build AST for property implementation declarations andFariborz Jahanian2008-04-231-2/+24
| | | | | | to print declaration from its AST. llvm-svn: 50117
* class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its ↵Ted Kremenek2008-04-171-7/+14
| | | | | | | | | | | | | | | | | dstor. clang.cpp: InitializePreprocessor now makes a copy of the contents of PredefinesBuffer and passes it to the preprocessor object. clang.cpp: DriverPreprocessorFactory now calls "InitializePreprocessor" instead of this being done in main(). html::HighlightMacros() now takes a PreprocessorFactory, allowing it to conjure up a new Preprocessor to highlight macros. class HTMLDiagnostics now takes a PreprocessorFactory* that it can use for html::HighlightMacros(). Updated clients of HTMLDiagnostics to use this new interface. llvm-svn: 49875
* Added property decl support for protocols.Fariborz Jahanian2008-04-171-119/+71
| | | | | | | Added assertion if unexpected property decls are found where they don't belong. Consolidated property decl. printing by using a helper function. llvm-svn: 49862
* This patch adds support for declaraing properties in categories,Fariborz Jahanian2008-04-161-0/+63
| | | | | | just as they are declared in objc classes. llvm-svn: 49817
* Hook up HTMLDiagnostics to use Chris's new syntax highlighting. --html-diagsTed Kremenek2008-04-161-15/+20
| | | | | | | currently doesn't pass in the Preprocessor from the driver, so we don't get syntax highlighting when we create HTMLDiagnostics in that way. llvm-svn: 49796
* Handle "__private_extern__" storage class when printing FunctionDecls.Ted Kremenek2008-04-151-0/+1
| | | | llvm-svn: 49706
* New AST representation for each objc2's property declaration.Fariborz Jahanian2008-04-141-9/+2
| | | | llvm-svn: 49699
* Use SourceManager::isFromMainFile()Ted Kremenek2008-04-141-1/+1
| | | | llvm-svn: 49685
* Added driver option "-checker-opt-analyze-headers" to force the staticTed Kremenek2008-04-141-12/+17
| | | | | | analyzer to analyze functions declared in header files. llvm-svn: 49675
* AST generation for objc2's property declarations.Fariborz Jahanian2008-04-111-1/+1
| | | | llvm-svn: 49565
* Fix some bonehead bugs in summary generation in CFRefCount.Ted Kremenek2008-04-101-1/+2
| | | | llvm-svn: 49503
* Refactored all logic to run the GRSimpleVals and CFRef checker into a commonTed Kremenek2008-04-101-83/+105
| | | | | | | | code path in the clang driver. Renamed options --grsimple to -checker-simple and -check-cfref to -checker-cfref. llvm-svn: 49500
* silence some warnings when assertions are disabled.Chris Lattner2008-04-081-2/+4
| | | | llvm-svn: 49372
* Better handling for tabs with message bubbles.Ted Kremenek2008-03-311-5/+7
| | | | llvm-svn: 49001
* Inlined clang/Analysis/Analyses/GRSimpleVals.h into LocalCheckers.h and removedTed Kremenek2008-03-311-13/+28
| | | | | | | | | | GRSimpleVals.h Added a PathDiagnosticClient option to the driver functions for the CFRefCountChecker and the GRSimpleVals analysis. Both analyses now accept a "-o" argument from the driver that specifies where HTML reports should be dumped. llvm-svn: 48989
* Disable timing diagnostics for GRSimpleVals.Ted Kremenek2008-03-311-0/+4
| | | | llvm-svn: 48981
* Don't emit any timings for GRSimple if the CFG is not going to be built.Ted Kremenek2008-03-271-0/+3
| | | | llvm-svn: 48882
* clean up iteration over propertydecls.Chris Lattner2008-03-171-6/+7
| | | | llvm-svn: 48435
* clean up property memory allocation to move it into the ast classesChris Lattner2008-03-171-2/+2
| | | | | | like the rest of the classes. llvm-svn: 48434
* Convert more counts to be zero based instead of -1 based, make them unsigned.Chris Lattner2008-03-161-1/+1
| | | | llvm-svn: 48429
* Make the parameter count of ObjCMethodDecl unsigned, youChris Lattner2008-03-161-1/+1
| | | | | | can't have negative arguments. llvm-svn: 48407
* Emit warnings for undefined control-flow.Ted Kremenek2008-03-141-4/+7
| | | | llvm-svn: 48368
* Path-sensitive analyses no longer take a FunctionDecl, but any Decl representingTed Kremenek2008-03-141-30/+68
| | | | | | | | | a block of "code". Patched various ASTConsumers (such as ASTDumper) to have more support for processing ObjCMethodDecl. CFGVisitor now builds CFGs for ObjCMethodDecls. llvm-svn: 48363
* The LiveVariables analysis no longer requires a FunctionDecl&; this allows itTed Kremenek2008-03-131-2/+2
| | | | | | to be run on other declarations of blocks of code (e.g., Objective-C methods.) llvm-svn: 48339
* Added bandaid support in CFG construction for ObjCForEachStmt and ObjCAtTryStmt:Ted Kremenek2008-03-131-2/+7
| | | | | | | | | | we gracefully back out and return NULL for the CFG, allowing clients to skip analyzing functions with these CFGs. We will add support later. Modified base ASTConsumer "CFGVisitor" to detect when a CFG is not constructed and to emit a warning. llvm-svn: 48322
* Added --trim-path-graph to the driver to trim paths from the ExplodedGraphTed Kremenek2008-03-071-6/+7
| | | | | | | | | | | | | | | | that are not related to error nodes. Fixed bug where we did not detect some NULL dereferences. Added "ExplodedGraph::Trim" to trim all nodes that cannot transitively reach a set of provided nodes. Fixed subtle bug in ExplodedNodeImpl where we could create predecessor iterators that included the mangled "sink" bit. The better fix is to integrate this bit into the void* for the wrapped State, not the NodeGroups representing a node's predecessors and successors. llvm-svn: 48036
* Added boilerplate to execute the CF reference count checker (which isn't yet ↵Ted Kremenek2008-03-061-0/+37
| | | | | | implemented). llvm-svn: 47982
* convert tabs to spaces, patch by Mike Stump!Chris Lattner2008-02-251-5/+5
| | | | llvm-svn: 47560
* Modified clang driver option -dump-live-variables to (optionally) use theTed Kremenek2008-02-221-2/+4
| | | | | | --analyze-function option to analyze specific functions. llvm-svn: 47498
* clang driver options --dump-cfg and --view-cfg now (optionally) use theTed Kremenek2008-02-221-8/+15
| | | | | | --analyze-function option to dump/view the CFGs of specific functions. llvm-svn: 47497
* When running the GRSimpleVals analysis, skip functions that do notTed Kremenek2008-02-221-2/+4
| | | | | | appear in a file. llvm-svn: 47491
* For now, --grsimple skips analyzing functions in header files.Ted Kremenek2008-02-191-0/+4
| | | | llvm-svn: 47303
* --grsimple now reports the number of nodes in the ExplodedGraph forTed Kremenek2008-02-191-2/+2
| | | | | | | | | an analyzed function. GRExprEngine now records stores to "uninitialized lvalues" (which are sinks in the ExplodedGraph). llvm-svn: 47293
OpenPOWER on IntegriCloud