summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex/CIndexUSRs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-477/+0
| | | | | | (C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
* Add USR support for 'static inline' functions (which can be declared in ↵Ted Kremenek2010-04-291-5/+20
| | | | | | | | header files). Add USR support for 'static' functions and local variables, which can be handy for resolving named variables within a translation unit. llvm-svn: 102641
* Remove USRGenerator::VisitBlockDecl(). We don't need to generate USRs for ↵Ted Kremenek2010-04-291-7/+0
| | | | | | | | blocks, since they have no linkage and by definition are anonymous. llvm-svn: 102640
* Fix USRs for 'extern' variables declaration in functions/method bodies.Ted Kremenek2010-04-201-2/+34
| | | | | | | Fix USRs for @synthesize. Add more USR tests. llvm-svn: 101954
* Add raw_ostream operators to NamedDecl for convenience. Switch over all ↵Benjamin Kramer2010-04-171-3/+3
| | | | | | | | 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
* Remove unneeded assertion and don't return a null CXString.Ted Kremenek2010-04-171-3/+1
| | | | llvm-svn: 101585
* Rework USR generation for symbols with no linkage. Many of the USRs are now ↵Ted Kremenek2010-04-161-28/+64
| | | | | | | | | | shortened, and we now include the file name that declares the symbol with no linkage in the USR. USRs for such symbols are generated only in restructed cases, e.g., anonymous enum declarations, typedefs, etc. llvm-svn: 101542
* Better support USRs for anonymous enums, structs, by including the location ↵Ted Kremenek2010-04-151-3/+42
| | | | | | | | where the tag was declared. WIP. llvm-svn: 101403
* Do not generate USRs for declarations with 'no linkage' except for enums, ↵Ted Kremenek2010-04-151-7/+28
| | | | | | | | structs, typedefs. Those still need work to disambiguate them across translation units. llvm-svn: 101401
* Prune includes.Benjamin Kramer2010-04-121-1/+2
| | | | llvm-svn: 101059
* Add initial USR support for macro definitions.Ted Kremenek2010-04-111-1/+11
| | | | llvm-svn: 100997
* Augment clang_getCursorUSR() to not always expect that clang_getCursorDecl() ↵Ted Kremenek2010-04-111-5/+11
| | | | | | | | does the right thing if the cursor is not a decl (such as in the case of macros). llvm-svn: 100996
* CIndex: move extractUSRSuffix out of extern "C" and simplify it.Benjamin Kramer2010-04-081-6/+4
| | | | llvm-svn: 100773
* Require that all Clang-based USRs start with the prefix 'c:' for the "USR ↵Ted Kremenek2010-03-251-6/+15
| | | | | | space". llvm-svn: 99475
* Make the CIndex API more resilient to being used on invalid code.Ted Kremenek2010-03-191-5/+21
| | | | llvm-svn: 98981
* Rename clang_constructUSR_ObjCategory to clang_constructUSR_ObjCCategory.Ted Kremenek2010-03-151-1/+1
| | | | | | (there was a missing 'C'). llvm-svn: 98554
* Implement several CIndex functions for constructing USRs from C-strings ↵Ted Kremenek2010-03-131-38/+160
| | | | | | instead of AST elements. llvm-svn: 98421
* Move createCXString() functions out of CIndexer and into the clang::cxstring ↵Ted Kremenek2010-02-171-4/+6
| | | | | | | | | | | | namespace. We can much more succinctly refer to these functions this way. Also change the default behavior of createCXString(StringRef&) to duplicate the string. This is almost always what we want. The other case is where we pass a constant c-string, which uses the other version of createCXString(). llvm-svn: 96423
* CIndex/USRs: Disable a bogus assert, we don't want CIndex to crash liberally. IDaniel Dunbar2010-01-311-1/+1
| | | | | | have sent Ted a test case for this. llvm-svn: 94935
* Eliminate CIndex's dependency on the Clang Index library, since weDouglas Gregor2010-01-221-4/+0
| | | | | | weren't actually using any of its facilities. llvm-svn: 94210
* Kill CXEntity and CXDecl. The first has never been used, while theDouglas Gregor2010-01-201-55/+0
| | | | | | second has been wholly replaced by cursors. llvm-svn: 94039
* Tweak USR output for ObjC categories.Ted Kremenek2010-01-181-4/+3
| | | | llvm-svn: 93805
* Refactor USR generation for TagDecls into a common method.Ted Kremenek2010-01-181-16/+10
| | | | llvm-svn: 93799
* Tweak USR generation to handle anonymous bitfields.Ted Kremenek2010-01-181-1/+18
| | | | llvm-svn: 93778
* Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing ↵Ted Kremenek2010-01-181-16/+25
| | | | | | 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle. llvm-svn: 93760
* Refactor USR logic for EnumDecls and RecordDecls so that both handle ↵Ted Kremenek2010-01-151-15/+16
| | | | | | 'anonymous' declarations in the same way. llvm-svn: 93585
* USR generation: look at the typedef of an anonymous struct (if any) when ↵Ted Kremenek2010-01-151-2/+6
| | | | | | trying to generate a USR. llvm-svn: 93572
* Add USR generation for enums.Ted Kremenek2010-01-151-0/+11
| | | | llvm-svn: 93543
* Further tweak USR generation by shorting names and distinguish between ↵Ted Kremenek2010-01-141-22/+41
| | | | | | namespaces and functions. llvm-svn: 93404
* Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl ↵Ted Kremenek2010-01-121-50/+61
| | | | | | | | instead of a CXEntity. Enhance USR generation a bit with support for records. llvm-svn: 93267
* Further tweaking of USR generation. WIP.Ted Kremenek2010-01-121-6/+20
| | | | llvm-svn: 93250
* Remove trailing semicolons and silence MSVC warning about C linkage.Benjamin Kramer2010-01-121-5/+5
| | | | | | | warning C4190: 'GetEntity' has C-linkage specified, but returns UDT 'clang::idx::Entity' which is incompatible with C llvm-svn: 93237
* Add a boilerplate implementation for clang_getUSR(). WIP.Ted Kremenek2010-01-121-2/+80
| | | | llvm-svn: 93223
* Change clang_getUSR() to return a CXString instead of a 'const char *'.Ted Kremenek2010-01-121-2/+2
| | | | llvm-svn: 93213
* CIndex:Ted Kremenek2010-01-111-6/+41
| | | | | | | | | - Remove unused (and unimplemented) clang_getDeclarationName(). - Remove unused (and unimplemented) clang_getEntity(). - Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity) - Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl). llvm-svn: 93209
* Split (mostly nonexistent) USR code out from the main CIndex logic.Ted Kremenek2010-01-051-0/+46
llvm-svn: 92789
OpenPOWER on IntegriCloud