summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* Add libclang visitation for C++ typeid expressions.Douglas Gregor2010-09-021-0/+12
| | | | llvm-svn: 112862
* In libclang, visit the nested-name-specifier and explicitly-specified ↵Douglas Gregor2010-09-021-1/+29
| | | | | | template arguments of a MemberExpr. llvm-svn: 112860
* Visit the nested-name-specifier and explicitly-specified templateDouglas Gregor2010-09-021-1/+24
| | | | | | arguments of a DeclRefExpr. llvm-svn: 112854
* Implement basic visitation for nested name specifiers via libclangDouglas Gregor2010-09-021-7/+71
| | | | | | | | cursors. Sadly, this visitation is a hack, because we don't have proper source-location information for nested-name-specifiers in the AST. It does improve on the status quo, however. llvm-svn: 112837
* Introduce a new libclang function,Douglas Gregor2010-09-023-2/+47
| | | | | | | | | clang_getSpecializedCursorTemplate(), which determines the template (or member thereof) that the given cursor specializes or from which it was instantiated. This routine can be used to establish a link between templates and their instantiations/specializations. llvm-svn: 112780
* Teach libclang to visit the default arguments of template parameters.Douglas Gregor2010-09-011-1/+30
| | | | llvm-svn: 112734
* Implement libclang support for using declarations. Clang actually usesDouglas Gregor2010-09-013-2/+43
| | | | | | | | | | | | | | | | three different kinds of AST nodes to represent using declarations: UsingDecl, UnresolvedUsingValueDecl, and UnresolvedUsingTypenameDecl. These three are collapsed into a single cursor kind for using declarations, since libclang clients don't need the distinction. Several related changes here: - Cursor visitation of the three AST nodes for using declarations - Proper source-range computation for these AST nodes - Using declarations have no USRs, since they don't actually declare any entities. llvm-svn: 112730
* Improve libclang indexing support for class template specializationsDouglas Gregor2010-09-012-0/+47
| | | | | | | | | | | | | in a few related ways: - Don't recurse into instantiations of templates. - Recurse into explicit specializations. - Visit the template arguments of an explicit specialization or explicit instantiation. - Include template specialization arguments in the USRs for class template specializations. llvm-svn: 112720
* Make it clear that libclang does not modify the command-line argumentsDouglas Gregor2010-09-012-5/+5
| | | | | | it is given. llvm-svn: 112717
* Implement libclang support for using directives (cursor + visitation +Douglas Gregor2010-09-013-3/+19
| | | | | | | | suppressing USRs). Also, fix up the source location information for using directives so that the declaration location refers to the namespace name. llvm-svn: 112693
* Add libclang support for namespace aliases (visitation + USRs) alongDouglas Gregor2010-08-314-6/+70
| | | | | | | | | | | with a new cursor kind for a reference to a namespace. There's still some oddities in the source location information for NamespaceAliasDecl that I'll address with a separate commit, so the source locations displayed in the load-namespaces.cpp test will change. llvm-svn: 112676
* Add a new libclang function clang_getTemplateCursorKind(), whichDouglas Gregor2010-08-314-2/+43
| | | | | | | | | | | determines the kind of declaration that would be generated if the given template were instantiated. This allows a client to distinguish among class/struct/union templates and function/member function/static member function templates. Also, teach clang_CXXMethod_isStatic() about function templates. llvm-svn: 112655
* Extend libclang with a new cursor kind that indicates a reference to aDouglas Gregor2010-08-313-9/+80
| | | | | | | | | template. Such cursors occur, for example, in template specialization types such as vector<int>. Note that we do not handle the super-interesting case where the template name is unresolved, e.g., within a template. llvm-svn: 112636
* Add libclang support for class template partial specializations,Douglas Gregor2010-08-313-8/+42
| | | | | | including a cursor kind, visitation, and USRs. llvm-svn: 112629
* Add a libclang cursor kind, visitation support and USR support for C++Douglas Gregor2010-08-313-6/+42
| | | | | | class templates. llvm-svn: 112627
* Implement basic support for indexing function templates inDouglas Gregor2010-08-313-6/+223
| | | | | | | | | | | | | | libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. llvm-svn: 112604
* libclang indexing support for C++ constructors, destructors, andDouglas Gregor2010-08-312-7/+74
| | | | | | | | conversion functions. This introduces new cursor kinds for these three C++ entities, and reworks visitation of function declarations so that we get type-source information for the names. llvm-svn: 112600
* Revert my user-defined literal commits - r1124{58,60,67} pendingAlexis Hunt2010-08-301-1/+0
| | | | | | some issues being sorted out. llvm-svn: 112493
* Implement C++0x user-defined string literals.Alexis Hunt2010-08-291-0/+1
| | | | | | | | | | The extra data stored on user-defined literal Tokens is stored in extra allocated memory, which is managed by the PreprocessorLexer because there isn't a better place to put it that makes sure it gets deallocated, but only after it's used up. My testing has shown no significant slowdown as a result, but independent testing would be appreciated. llvm-svn: 112458
* Add source file I meant to include in my previous commit.Ted Kremenek2010-08-271-0/+48
| | | | llvm-svn: 112303
* Implement CXCursor support for walking C++ base specifiers. This includes ↵Ted Kremenek2010-08-276-4/+61
| | | | | | | | adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier. Implements <rdar://problem/8274883>. llvm-svn: 112296
* Teach clang_codeComplete to always sort its code-completion resultsDouglas Gregor2010-08-271-0/+1
| | | | llvm-svn: 112292
* Implement code completion for @selector expressionsDouglas Gregor2010-08-261-1/+1
| | | | llvm-svn: 112186
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-263-0/+37
| | | | | | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. 3rd try. How embarrassing. llvm-svn: 112180
* Revert r112149, "Move the sorting of code-completion results out of the mainDaniel Dunbar2010-08-263-37/+0
| | | | | | path and ...", it is failing tests. llvm-svn: 112161
* Revert r112154, "Fix thinko in sorting operation", it depends on r112149 whichDaniel Dunbar2010-08-261-2/+2
| | | | | | doth lay upon the chopping block. llvm-svn: 112160
* Fix thinko in sorting operationDouglas Gregor2010-08-261-2/+2
| | | | llvm-svn: 112154
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-263-0/+37
| | | | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. llvm-svn: 112149
* Add libclang API hook "clang_getIBOutletCollectionType" to query the ↵Ted Kremenek2010-08-268-5/+63
| | | | | | collection type for iboutletcollection attributes. llvm-svn: 112139
* Revert "Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-261-2/+0
| | | | | | | into the clients", because the C standard library sucks. Where's my stable sort, huh? llvm-svn: 112121
* When annotating tokens, don't fallback to annotating with a null cursor for ↵Ted Kremenek2010-08-251-3/+2
| | | | | | cursors that come before a macro instantiation. Fixes <rdar://problem/7974151>. llvm-svn: 112096
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-251-0/+2
| | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. llvm-svn: 112095
* Teach Sema to live without CodeCompleteConsumer.h.John McCall2010-08-251-1/+1
| | | | llvm-svn: 112028
* USRs for class extensions should "mangle" in the location of the extension. ↵Ted Kremenek2010-08-241-2/+23
| | | | | | (<rdar://problem/8350262>) llvm-svn: 111991
* Introduce new libclang API functions that determine the availabilityDouglas Gregor2010-08-234-4/+40
| | | | | | | of a cursor or code-completion result, e.g., whether that result refers to an unavailable, deleted, or deprecated declaration. llvm-svn: 111858
* libclang: Print more information when recovering from crashes inDaniel Dunbar2010-08-231-1/+20
| | | | | | clang_parseTranslationUnit. llvm-svn: 111855
* Detabify.Eli Friedman2010-08-221-1/+1
| | | | llvm-svn: 111768
* Another step in the process of making the parser depend on Sema:John McCall2010-08-202-3/+3
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* When performing code-completion in the presence of a preamble, makeDouglas Gregor2010-08-201-6/+2
| | | | | | | | | sure to (1) actually use the remapped files we were given rather than old data, and (2) keep the remapped files alive until the code-completion results are destroyed. Big thanks to Daniel for the test case. llvm-svn: 111597
* libclang: Execute clang_codeCompleteAt() inside a crash recovery context.Daniel Dunbar2010-08-192-13/+48
| | | | | | | - Test case is disabled for now, because something isn't write with file remapping. llvm-svn: 111581
* libclang/Darwin: Always set the compatibility version in the dylib.Daniel Dunbar2010-08-191-11/+10
| | | | llvm-svn: 111578
* More PCH -> AST renaming.Sebastian Redl2010-08-181-3/+3
| | | | llvm-svn: 111472
* Generate Attr subclasses with TableGen.Alexis Hunt2010-08-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Now all classes derived from Attr are generated from TableGen. Additionally, Attr* is no longer its own linked list; SmallVectors or Attr* are used. The accompanying LLVM commit contains the updates to TableGen necessary for this. Some other notes about newly-generated attribute classes: - The constructor arguments are a SourceLocation and a Context&, followed by the attributes arguments in the order that they were defined in Attr.td - Every argument in Attr.td has an appropriate accessor named getFoo, and there are sometimes a few extra ones (such as to get the length of a variadic argument). Additionally, specific_attr_iterator has been introduced, which will iterate over an AttrVec, but only over attributes of a certain type. It can be accessed through either Decl::specific_attr_begin/end or the global functions of the same name. llvm-svn: 111455
* libclang: Put clang_reparseTranslationUnit inside a crash recovery context.Daniel Dunbar2010-08-181-8/+45
| | | | llvm-svn: 111451
* libclang: Put clang_parseTranslationUnit inside a crash recovery context.Daniel Dunbar2010-08-181-12/+47
| | | | llvm-svn: 111387
* libclang: Implicitly enable crash recovery when using the libclang APIs. We ↵Daniel Dunbar2010-08-181-0/+5
| | | | | | may need to add an explicit API call, but hopefully we can make the crash recovery seamless enough that it doesn't make sense to turn it off. llvm-svn: 111386
* Simplify FixItHint by eliminated the unnecessary InsertionLocDouglas Gregor2010-08-181-20/+7
| | | | | | location. Patch by Eelis van der Weegen! llvm-svn: 111362
* Reintroduce the serialization library, with fixed dependencies.Sebastian Redl2010-08-172-1/+2
| | | | llvm-svn: 111279
* Remove the last bit of the Clang Serialization library, for nowDouglas Gregor2010-08-171-2/+1
| | | | llvm-svn: 111267
* Add the clangSerialization library to libclang.Dan Gohman2010-08-171-1/+2
| | | | llvm-svn: 111261
OpenPOWER on IntegriCloud