summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* [CMake] Apply ADDITIONAL_HEADERS introduced in r199639.NAKAMURA Takumi2014-01-201-1/+3
| | | | llvm-svn: 199640
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* [CMake] clang/lib: Satisfy dependencies to add *actually used* libraries on ↵NAKAMURA Takumi2013-12-091-1/+8
| | | | | | | | target_link_libraries() and LLVM_LINK_COMPONENTS. I will prune redundant dependencies later. llvm-svn: 196800
* libclang does not depend directly on clangFormat; but clangIndex doesDmitri Gribenko2013-11-131-0/+1
| | | | llvm-svn: 194611
* Documentation parsing: move comment-to-XML conversion routines to libIndexDmitri Gribenko2013-11-133-0/+1215
| | | | llvm-svn: 194610
* Avoid using the 'index' namespace as scope.Argyrios Kyrtzidis2013-08-211-16/+19
| | | | | | This should fix the bogus ambiguous reference errors reported by gcc 4.2.1 that the FreeBSD bot is using. llvm-svn: 188850
* Rename libIDE to libIndex.Argyrios Kyrtzidis2013-08-173-0/+821
| | | | | | | Per feedback from Chandler, it's better to have libraries with more specific functionality. LibIndex will contain the indexing functionality of libclang, which includes USR generation. llvm-svn: 188601
* Remove the unused, unmaintained, incomplete 'Index' library.Douglas Gregor2012-04-1316-1770/+0
| | | | llvm-svn: 154672
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Unbreak the CMake builds following the CallGraph change.Anna Zaks2012-03-021-1/+1
| | | | llvm-svn: 151952
* [analyzer] Rename clang::CallGraph into clang::idx::CallGraph + renameAnna Zaks2012-03-021-4/+6
| | | | | | | | | | | | | 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.) llvm-svn: 151950
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-4/+4
| | | | llvm-svn: 148577
* Remove unnecessary default cases in switches over enums.David Blaikie2012-01-171-2/+0
| | | | | | This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
* Replace all comparisons between ObjCInterfaceDecl pointers with callsDouglas Gregor2011-12-151-2/+2
| | | | | | | | to declaresSameEntity(), as a baby step toward tracking forward declarations of Objective-C classes precisely. Part of <rdar://problem/10583531>. llvm-svn: 146618
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-141-2/+2
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-1/+0
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-2/+2
| | | | llvm-svn: 140367
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-234-8/+8
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* now that we have a centralized place to do so, add some using declarations forChris Lattner2011-07-201-1/+1
| | | | | | | some common llvm types: stringref and smallvector. This cleans up the codebase quite a bit. llvm-svn: 135576
* Modify some deleted function methods to better reflect reality:Alexis Hunt2011-05-062-2/+2
| | | | | | | | | | | | | | | | | | | | - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. llvm-svn: 131013
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-1/+1
| | | | llvm-svn: 129567
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Give some convenient idiomatic accessors to Stmt::child_range andJohn McCall2011-02-132-3/+2
| | | | | | | Stmt::const_child_range, then make a bunch of places use them instead of the individual iterator accessors. llvm-svn: 125450
* CMake: LLVM_NO_RTTI must be obsolete now!NAKAMURA Takumi2011-02-101-2/+0
| | | | llvm-svn: 125275
* Fix CMake clangIndex library dependencies, from Logan ChienDouglas Gregor2010-09-201-15/+1
| | | | llvm-svn: 114336
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-19/+17
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-17/+19
| | | | | | of whatever we were using before... llvm-svn: 113631
* Clean up CMake dependenciesDouglas Gregor2010-09-091-0/+5
| | | | llvm-svn: 113489
* Clean up some of the CMake dependenciesDouglas Gregor2010-09-081-0/+14
| | | | llvm-svn: 113416
* De-memberify the VarDecl and FunctionDecl StorageClass enums.John McCall2010-08-261-2/+2
| | | | | | This lets us remove Sema.h's dependency on Expr.h and Decl.h. llvm-svn: 112156
* Remove unused location-to-AST-node resolver. libclang's implementation ↵Douglas Gregor2010-07-192-603/+0
| | | | | | supercedes it llvm-svn: 108708
* BUILD_ARCHIVE is the default for libraries, no need to set it.Chris Lattner2010-07-181-1/+0
| | | | llvm-svn: 108633
* Collect function definitions in the Indexer when indexing through the ASTs.Zhongxing Xu2010-07-063-17/+64
| | | | | | Add an API to get an Entity associated with a name in the global namespace. llvm-svn: 107642
* Local variables have no linkage, make invalid Entities.Zhongxing Xu2010-07-061-0/+4
| | | | llvm-svn: 107630
* Refrase comments.Zhongxing Xu2010-07-051-3/+3
| | | | llvm-svn: 107607
* Although in C++ class name has external linkage, usually the definition of the Zhongxing Xu2010-07-051-0/+8
| | | | | | | class is available in the same translation unit when it's needed. So we make all of them invalid Entity. llvm-svn: 107606
* Make FieldDecl an invalid Entity since it has no linkage.Zhongxing Xu2010-07-051-2/+2
| | | | llvm-svn: 107605
* Indexer: make FieldDecl an internal Entity.Zhongxing Xu2010-07-051-0/+6
| | | | llvm-svn: 107604
* Change CallGraph::Prog to be a reference. idx::Program means to be a global ↵Zhongxing Xu2010-07-021-1/+1
| | | | | | object to the Index library. llvm-svn: 107461
* Simplify libIndex Makefile, which doesn't need to worry about altivec support.Daniel Dunbar2010-06-081-6/+0
| | | | llvm-svn: 105639
* Makefiles: Set Clang CPP compiler flags in a single location, instead of ↵Daniel Dunbar2010-06-081-2/+0
| | | | | | scattered throughout the project Makefiles. llvm-svn: 105638
* Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.Daniel Dunbar2010-06-081-3/+3
| | | | | | - This eliminates most dependencies on how Clang is installed relative to LLVM. llvm-svn: 105637
* Renamed misleading getSourceRange -> getLocalSourceRange and ↵Abramo Bagnara2010-05-202-2/+2
| | | | | | getFullSourceRange -> getSourceRange for TypeLoc. llvm-svn: 104220
* Substantially alter the design of the Objective C type AST by introducingJohn McCall2010-05-152-23/+12
| | | | | | | | | | | | | | | | | | | | | ObjCObjectType, which is basically just a pair of one of {primitive-id, primitive-Class, user-defined @class} with a list of protocols. An ObjCObjectPointerType is therefore just a pointer which always points to one of these types (possibly sugared). ObjCInterfaceType is now just a kind of ObjCObjectType which happens to not carry any protocols. Alter a rather large number of use sites to use ObjCObjectType instead of ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather than hashing them in a FoldingSet. Remove some number of methods that are no longer used, at least after this patch. By simplifying ObjCObjectPointerType, we are now able to easily remove and apply pointers to Objective-C types, which is crucial for a certain kind of ObjC++ metaprogramming common in WebKit. llvm-svn: 103870
* Overhaul the AST representation of Objective-C message sendDouglas Gregor2010-04-211-23/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expressions, to improve source-location information, clarify the actual receiver of the message, and pave the way for proper C++ support. The ObjCMessageExpr node represents four different kinds of message sends in a single AST node: 1) Send to a object instance described by an expression (e.g., [x method:5]) 2) Send to a class described by the class name (e.g., [NSString method:5]) 3) Send to a superclass class (e.g, [super method:5] in class method) 4) Send to a superclass instance (e.g., [super method:5] in instance method) Previously these four cases where tangled together. Now, they have more distinct representations. Specific changes: 1) Unchanged; the object instance is represented by an Expr*. 2) Previously stored the ObjCInterfaceDecl* referring to the class receiving the message. Now stores a TypeSourceInfo* so that we know how the class was spelled. This both maintains typedef information and opens the door for more complicated C++ types (e.g., dependent types). There was an alternative, unused representation of these sends by naming the class via an IdentifierInfo *. In practice, we either had an ObjCInterfaceDecl *, from which we would get the IdentifierInfo *, or we fell into the case below... 3) Previously represented by a class message whose IdentifierInfo * referred to "super". Sema and CodeGen would use isStr("super") to determine if they had a send to super. Now represented as a "class super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). 4) Previously represented by an instance message whose receiver is a an ObjCSuperExpr, which Sema and CodeGen would check for via isa<ObjCSuperExpr>(). Now represented as an "instance super" send, where we have both the location of the "super" keyword and the ObjCInterfaceDecl* of the superclass we're targetting (statically). Note that ObjCSuperExpr only has one remaining use in the AST, which is for "super.prop" references. The new representation of ObjCMessageExpr is 2 pointers smaller than the old one, since it combines more storage. It also eliminates a leak when we loaded message-send expressions from a precompiled header. The representation also feels much cleaner to me; comments welcome! This patch attempts to maintain the same semantics we previously had with Objective-C message sends. In several places, there are massive changes that boil down to simply replacing a nested-if structure such as: if (message has a receiver expression) { // instance message if (isa<ObjCSuperExpr>(...)) { // send to super } else { // send to an object } } else { // class message if (name->isStr("super")) { // class send to super } else { // send to class } } with a switch switch (E->getReceiverKind()) { case ObjCMessageExpr::SuperInstance: ... case ObjCMessageExpr::Instance: ... case ObjCMessageExpr::SuperClass: ... case ObjCMessageExpr::Class:... } There are quite a few places (particularly in the checkers) where send-to-super is effectively ignored. I've placed FIXMEs in most of them, and attempted to address send-to-super in a reasonable way. This could use some review. llvm-svn: 101972
* Add raw_ostream operators to NamedDecl for convenience. Switch over all ↵Benjamin Kramer2010-04-171-2/+2
| | | | | | | | users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. llvm-svn: 101632
* Allow users to set CPPFLAGS and CXXFLAGS on the make command line.Jeffrey Yasskin2010-03-121-2/+2
| | | | | Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) llvm-svn: 98399
* Cleanup using StringRefKovarththanan Rajaratnam2010-03-122-12/+4
| | | | llvm-svn: 98339
* Extend ObjCMessageExpr for class method sends with the source locationDouglas Gregor2010-03-081-2/+2
| | | | | | of the class name. llvm-svn: 97943
* -fno-rtti is now the default.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94379
OpenPOWER on IntegriCloud