summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix 80 col violation.Ted Kremenek2009-07-061-4/+4
| | | | llvm-svn: 74877
* Restructure NewCastRegion to use a switch statement that dispatches off theTed Kremenek2009-07-061-51/+62
| | | | | | | region type. This better shows the logic of the method and allows the compiler to check if we didn't handle a specific region kind. llvm-svn: 74876
* Fix 80 col violation.Ted Kremenek2009-07-061-2/+2
| | | | llvm-svn: 74875
* NewCastRegion: Handle casts to any Objective-C pointer, not just qualified ids.Ted Kremenek2009-07-061-2/+2
| | | | llvm-svn: 74874
* Implement FIXME.Ted Kremenek2009-07-061-1/+1
| | | | llvm-svn: 74872
* StoreManager::NewCastRegion:Ted Kremenek2009-07-061-10/+22
| | | | | | | | - Refactor logic that creates ElementRegions into a help method 'MakeElementRegion'. - Fix crash due to not handling StringRegions. Casts of StringRegions now result in a new ElementRegion layered on the original StringRegion. llvm-svn: 74867
* Make 'BasicStoreManager' + 'NewCastRegion' testable from the command line ↵Ted Kremenek2009-07-061-2/+6
| | | | | | using '-analyzer-store=basic-new-cast'. llvm-svn: 74865
* Update CMake files.Argyrios Kyrtzidis2009-07-063-3/+3
| | | | llvm-svn: 74864
* Some changes to ASTLocation's methodsArgyrios Kyrtzidis2009-07-061-2/+5
| | | | | | | | -Change hasStmt() to isStmt() -Add isDecl() -Add getSourceRange() llvm-svn: 74862
* Move the 'ResolveLocationInAST' function from the Frontend library to the ↵Argyrios Kyrtzidis2009-07-061-3/+3
| | | | | | | | Index library. Also, cut down its comments; more comments will be added to ASTLocation. llvm-svn: 74860
* Move ASTLocation and DeclReferenceMap from the AST library to the Index library.Argyrios Kyrtzidis2009-07-063-6/+9
| | | | llvm-svn: 74859
* Rename 'ASTNode' -> 'ASTLocation'.Argyrios Kyrtzidis2009-07-064-19/+19
| | | | | | ASTLocation is a much better name for its intended purpose which to represent a "point" into the AST. llvm-svn: 74858
* NewCastRegion:Ted Kremenek2009-07-061-12/+10
| | | | | | | - Have test for 'CodeTextRegion' dominate other region tests. - Use 'getAsRecordType' instead of isa<RecordType> llvm-svn: 74853
* Fix loop so that 'continue' statements actually cause the loop to iterate.Ted Kremenek2009-07-061-2/+1
| | | | llvm-svn: 74852
* Move the new 'CastRegion' implementation from RegionStoreManager to StoreManagerTed Kremenek2009-07-062-83/+83
| | | | | | | (its superclass). This will allow us to experiment with using the new CastRegion with BasicStoreManager, and gradually phase out the old implementation. llvm-svn: 74851
* Fix a problem with false diagnostics when comparing distinct NULL pointer ↵Douglas Gregor2009-07-061-7/+13
| | | | | | types, from David Majnemer llvm-svn: 74850
* Fix PR 4489, a crash in PCH loading that occurs when loading the nameDouglas Gregor2009-07-062-20/+81
| | | | | | | | | | of a top-level declaration loads another top-level declaration of the same name whose type depends on the first declaration having been completed. This commit breaks the circular dependency by delaying loads of top-level declarations triggered by loading a name until we are no longer recursively loading types or declarations. llvm-svn: 74847
* Fix <rdar://problem/7033733>. The CF_RETURNS_RETAINED attribute should work ↵Ted Kremenek2009-07-061-3/+11
| | | | | | if the return type on an Objective-C method is a CF type reference, not just an Objective-C object reference. llvm-svn: 74841
* Parsing fix for out-of-line constructors, from Piotr RakDouglas Gregor2009-07-061-2/+4
| | | | llvm-svn: 74833
* Keep track of the Expr used to describe the size of an array type,Douglas Gregor2009-07-0613-43/+226
| | | | | | from Enea Zaffanella! llvm-svn: 74831
* Fix bitfield promotion in the presence of explicit casts, from Abrama Bagnara.Douglas Gregor2009-07-061-1/+1
| | | | llvm-svn: 74830
* Further cleanup of region invalidation code. No functionality change.Zhongxing Xu2009-07-062-54/+57
| | | | llvm-svn: 74816
* Start to gradually move region invalidation code into store manager.Zhongxing Xu2009-07-062-66/+60
| | | | | | No functionality change. llvm-svn: 74812
* Fix for PR4502: add calculation of the integer conversion rank for Eli Friedman2009-07-051-0/+3
| | | | | | wchar_t. llvm-svn: 74808
* More tweaks to types for OpenBSD. Patch by Jonathan Gray.Eli Friedman2009-07-051-1/+14
| | | | llvm-svn: 74805
* Introduce the 'Index' library.Argyrios Kyrtzidis2009-07-058-1/+338
| | | | | | | | | Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc. Currently it is very "primitive" and with no type-names support. It can provide functionality like "show me all references of this function from these translation units". llvm-svn: 74802
* Introduce the DeclReferenceMap class inside the AST library.Argyrios Kyrtzidis2009-07-052-0/+132
| | | | | | | | | DeclReferenceMap (similar to ParentMap) is a helper class for mapping Decls to the AST nodes that reference them. A client will initialize it by passing an ASTContext to its constructor and later use it to iterate over the references of a Decl. References are mapped and retrieved using the primary declaration (Decl::getPrimaryDecl()) of a particular Decl. llvm-svn: 74801
* Introduce the virtual method Decl::getPrimaryDecl().Argyrios Kyrtzidis2009-07-051-0/+16
| | | | | | | When a Decl subclass can have multiple re-declarations in the same declaration context (like FunctionDecl), getPrimaryDecl() will return a particular Decl that all of them will point to as the "primary" declaration. llvm-svn: 74800
* Avoid re-checking the parameters of a function, when trying to resolve a ↵Argyrios Kyrtzidis2009-07-051-5/+12
| | | | | | location. llvm-svn: 74799
* Make use of ASTNode for return value of clang::ResolveLocationInAST() and in ↵Argyrios Kyrtzidis2009-07-051-4/+4
| | | | | | the index-test tool. llvm-svn: 74798
* Introduce ASTNode class into the AST library.Argyrios Kyrtzidis2009-07-052-0/+91
| | | | | | ASTNode is an immutable pair of a Decl and Stmt. If Stmt is not null, Decl should be its immediate parent. llvm-svn: 74797
* Do an early check for function definition.Argyrios Kyrtzidis2009-07-051-10/+12
| | | | llvm-svn: 74796
* Per PR4506, fix the type of size_t on OpenBSD.Eli Friedman2009-07-051-1/+12
| | | | llvm-svn: 74795
* Catch function redeclarations with incompatible exception specifications.Sebastian Redl2009-07-043-0/+57
| | | | llvm-svn: 74787
* This fixes the case where the wrong symbol is emitted leading to linking ↵Fariborz Jahanian2009-07-031-4/+9
| | | | | | | | errors when you reference a class before defining it (GNU runtime). Patch by David Chisnall. llvm-svn: 74772
* remove utility methods that are not very useful.Zhongxing Xu2009-07-031-1/+1
| | | | llvm-svn: 74762
* Add an intermediate typedef for __builtin_va_tag to make it a bit easier Eli Friedman2009-07-031-1/+2
| | | | | | | to deal with for AST pretty-printing/rewriting. Patch by Abramo Bagnara. llvm-svn: 74752
* Remove unused method.Ted Kremenek2009-07-031-3/+0
| | | | llvm-svn: 74751
* BasicStoreManager: Use SymbolManager::canSymbolicate() to determine if a ↵Ted Kremenek2009-07-031-1/+1
| | | | | | variable can be symbolicated. llvm-svn: 74750
* Fix a horrible CFG bug reported in <rdar://problem/7027684>. The wrong successorTed Kremenek2009-07-031-1/+1
| | | | | | | block would get hooked up in some cases when processing empty compound statements. llvm-svn: 74743
* Replace guarded calls in RegionStoreManager toTed Kremenek2009-07-021-21/+7
| | | | | | | | | ValueManager::getRegionValueSymbolVal() with unguarded calls to ValueManager::getRegionValueSymbolValOrUnknown(). This changes centralizes the decision of what values to symbolicate in SymbolManager rather than having it scatter in RegionStoreManager. llvm-svn: 74730
* Enhance RegionStore to lazily symbolicate fields and array elements forTed Kremenek2009-07-022-2/+13
| | | | | | structures passed-by-value as function arguments. llvm-svn: 74729
* Patch to allocate list of bases in CXXRecordDeclFariborz Jahanian2009-07-022-6/+10
| | | | | | using ASTContxt allocation. llvm-svn: 74717
* StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead ofTed Kremenek2009-07-023-7/+21
| | | | | | | directly consulting if a VarDecl is an implicit or actual parameter, a global, etc. llvm-svn: 74716
* Add a separate MemSpaceRegion for function/method arguments passed on the stack.Ted Kremenek2009-07-021-3/+11
| | | | | | | This will simplify the logic of StoreManagers that want to specially reason about the values of parameters. llvm-svn: 74715
* Remove commented methods. Add MemRegion::printStdErr().Ted Kremenek2009-07-021-0/+4
| | | | llvm-svn: 74709
* Add support for retrieving the Doxygen comment associated with a givenDouglas Gregor2009-07-029-5/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declaration in the AST. The new ASTContext::getCommentForDecl function searches for a comment that is attached to the given declaration, and returns that comment, which may be composed of several comment blocks. Comments are always available in an AST. However, to avoid harming performance, we don't actually parse the comments. Rather, we keep the source ranges of all of the comments within a large, sorted vector, then lazily extract comments via a binary search in that vector only when needed (which never occurs in a "normal" compile). Comments are written to a precompiled header/AST file as a blob of source ranges. That blob is only lazily loaded when one requests a comment for a declaration (this never occurs in a "normal" compile). The indexer testbed now supports comment extraction. When the -point-at location points to a declaration with a Doxygen-style comment, the indexer testbed prints the associated comment block(s). See test/Index/comments.c for an example. Some notes: - We don't actually attempt to parse the comment blocks themselves, beyond identifying them as Doxygen comment blocks to associate them with a declaration. - We won't find comment blocks that aren't adjacent to the declaration, because we start our search based on the location of the declaration. - We don't go through the necessary hops to find, for example, whether some redeclaration of a declaration has comments when our current declaration does not. Similarly, we don't attempt to associate a \param Foo marker in a function body comment with the parameter named Foo (although that is certainly possible). - Verification of my "no performance impact" claims is still "to be done". llvm-svn: 74704
* Look through vector types when determining the base type of a type for ↵Douglas Gregor2009-07-011-0/+2
| | | | | | declarator printing. Bug found via the PCH tester llvm-svn: 74672
* Use Destroy for member initializer list clean up.Fariborz Jahanian2009-07-012-2/+15
| | | | | | Per Doug's comments. Doug please review. llvm-svn: 74666
* Minor code cleanup: pull variables into scope of 'if' statement, limiting theirTed Kremenek2009-07-011-10/+8
| | | | | | actual lifetime to their logical lifetime. llvm-svn: 74665
OpenPOWER on IntegriCloud