aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Index
AgeCommit message (Collapse)Author
2012-04-13Remove the unused, unmaintained, incomplete 'Index' library.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154672 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-09[AST/etc] Mark {getSourceRange(),getStartLoc(),getEndLoc()} as LLVM_READONLY.Daniel Dunbar
- The theory here is that we have these functions sprinkled in all over the place. This should allow the optimizer to at least realize it can still do load CSE across these calls. - I blindly marked all instances as such, even though the optimizer can infer this attribute in some instances (some of the inline ones) as that was easier and also, when given the choice between thinking and not thinking, I prefer the latter. You might think this is mere frivolity, but actually this is good for a .7 - 1.1% speedup on 403.gcc/combine.c, JSC/Interpreter.cpp, OGF/NSBezierPath-OAExtensions.m. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152426 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02[analyzer] Rename clang::CallGraph into clang::idx::CallGraph + renameAnna Zaks
the corresponding files to avoid confusion. This is a preparation to adding an AST-based call graph to Analysis. The existing call graph works with indexer entries. We might be able to refactor it to use the AST based graph in the future. (Minimal testing here as the only example that uses the API has been completely broken, does not compile.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151950 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09Fixing 80 col violations (& removing any trailing whitespace on files I was ↵David Blaikie
touching anyway) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144171 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-25Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20remove some now-redundant forward declarations.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135578 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20now that we have a centralized place to do so, add some using declarations forChris Lattner
some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22Make a bunch of new data structures for the new analysisZhongxing Xu
engine of the new translation unit. State marshal is there but no real work is done. End nodes are passed back. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19Remove unused location-to-AST-node resolver. libclang's implementation ↵Douglas Gregor
supercedes it git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Add skeleton code to make wpa call the analysis engine.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-06Collect function definitions in the Indexer when indexing through the ASTs.Zhongxing Xu
Add an API to get an Entity associated with a name in the global namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-02Change CallGraph::Prog to be a reference. idx::Program means to be a global ↵Zhongxing Xu
object to the Index library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15update to match LLVM API change:Chris Lattner
Remove isPod() from DenseMapInfo, splitting it out to its own isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03Fix layering violation by moving Analysis/CallGraph to IndexDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90424 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-28Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to ↵Steve Naroff
<rdar://problem/7310688>. Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex. I wanted to land the major changes before finishing up the optimizations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85425 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up ↵Steve Naroff
searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'. snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out snaroff% cat Large.m #import <Cocoa/Cocoa.h> #import <QuickTime/QuickTime.h> #import <OpenGL/OpenGL.h> With a 'relativeDecl', it takes <30 seconds:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84760 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.Steve Naroff
Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18Clone the full Type hierarchy into the TypeLoc hierarchy. NormalizeJohn McCall
TypeLoc class names to be $(Type classname)Loc. Rewrite the visitor. Provide skeleton implementations for all the new TypeLocs. Handle all cases in PCH. Handle a few more cases when inserting location information in SemaType. It should be extremely straightforward to add new location information to existing TypeLoc objects now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-16Make CIndex and c-index-test a little bit more robust. The onlyDouglas Gregor
substantive change is that clang_getCursorSource() now returns the file in which a macro was instantiated when the cursor points into a macro instantiation, rather than crashing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:Argyrios Kyrtzidis
-A NamedDecl reference -A TypeLoc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29Add more const-goodness to ASTLocation.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21Add Diagnostic to Indexer, and have it keep its own FileManager instead of ↵Daniel Dunbar
taking an external reference (which was leaked in the case of the CIndex library). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82429 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-28Lot's of little changes to get the C-based indexing API going...Steve Naroff
Work in progress. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80367 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30Add support for ObjC message expressions, in the Analyzer:Argyrios Kyrtzidis
-Accept an ObjC method and find all message expressions that this method may respond to. -Accept an ObjC message expression and find all methods that may respond to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77551 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Support ObjC methods as Entities.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap ↵Argyrios Kyrtzidis
and SelectorMap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Index the selectors and provide the translation units that contain themArgyrios Kyrtzidis
through the IndexProvider. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Add TranslationUnit::getSelectorMap().Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Introduce SelectorMap whose purpose is to map selectors to objc methods and ↵Argyrios Kyrtzidis
message exprs, inside a particular ASTContext. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Introduce the GlobalSelector class in the Indexing library.Argyrios Kyrtzidis
GlobalSelector is an ASTContext-independent way to refer to Objective C selectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77538 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29-Introduce the idx::Analyzer class used for getting indexing information, ↵Argyrios Kyrtzidis
like finding references of a declaration across translation units. -Modify the index-test tool to use it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Introduce TULocation and TULocationHandler classes.Argyrios Kyrtzidis
TULocation is like ASTLocation but also contains the TranslationUnit* that the ASTLocation originated from. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Modify the Indexer class so that it can return the TranslationUnit that internalArgyrios Kyrtzidis
decls originated from. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77534 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Add Entity::getInternalDecl() to be used only on Entities that refer to internalArgyrios Kyrtzidis
(in translation unit) declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Constify ASTLocation::print.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Fix some comments.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77530 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Introduce a helper template for the Handler classes and use it insteadArgyrios Kyrtzidis
of the iterator of the Indexer class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Accept Handler objects in parameters as references.Argyrios Kyrtzidis
Reinforces that they shouldn't be null and it's a bit more natural when they are passed as stack objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Rename EntityHandler::HandleEntity to Handle.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29-Make IndexProvider an abstract interface for getting indexing information.Argyrios Kyrtzidis
-Introduce Indexer as an IndexProvider implementation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24Constify methods.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76939 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23constify methods.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76873 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Remove the ASTContext parameter from Entity::getPrintableName().Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Keep only canonical Decls in Entities.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Change the semantics for Entity.Argyrios Kyrtzidis
Entity can now refer to declarations that are not visible outside the translation unit. It is a wrapper of a pointer union, it's either a Decl* for declarations that don't "cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl. Included is a test case for handling fields across translation units. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Introduce ASTLocation::getReferencedDecl(), for getting the declaration that ↵Argyrios Kyrtzidis
the ASTLocation references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76336 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Rename Entity::getName() to Entity::getPrintableName() to make its purposeZhongxing Xu
more obvious. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76167 91177308-0d34-0410-b5e6-96231b3b80d8