summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXCursor.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Parsing/AST support for Structured Exception HandlingJohn Wiegley2011-04-281-0/+3
| | | | | | | | Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. llvm-svn: 130366
* Implementation of Embarcadero array type traitsJohn Wiegley2011-04-281-0/+1
| | | | | | | | | | Patch authored by John Wiegley. These are array type traits used for parsing code that employs certain features of the Embarcadero C++ compiler: __array_rank(T) and __array_extent(T, Dim). llvm-svn: 130351
* t/clang/expr-traitsJohn Wiegley2011-04-251-0/+1
| | | | | | | | | Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. llvm-svn: 130122
* C1X: implement generic selectionsPeter Collingbourne2011-04-151-0/+1
| | | | | | | As an extension, generic selection support has been added for all supported languages. The syntax is the same as for C1X. llvm-svn: 129554
* Add support for C++0x's range-based for loops, as specified by the C++11 ↵Richard Smith2011-04-141-0/+1
| | | | | | draft standard (N3291). llvm-svn: 129541
* Add support for the OpenCL vec_step operator, by generalising andPeter Collingbourne2011-03-111-1/+1
| | | | | | | extending the existing support for sizeof and alignof. Original patch by Guy Benyei. llvm-svn: 127475
* Change the representation of GNU ?: expressions to use a different expressionJohn McCall2011-02-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | class and to bind the shared value using OpaqueValueExpr. This fixes an unnoticed problem with deserialization of these expressions where the deserialized form would lose the vital pointer-equality trait; or rather, it fixes it because this patch also does the right thing for deserializing OVEs. Change OVEs to not be a "temporary object" in the sense that copy elision is permitted. This new representation is not totally unawkward to work with, but I think that's really part and parcel with the semantics we're modelling here. In particular, it's much easier to fix things like the copy elision bug and to make the CFG look right. I've tried to update the analyzer to deal with this in at least some obvious cases, and I think we get a much better CFG out, but the printing of OpaqueValueExprs probably needs some work. llvm-svn: 125744
* AST, Sema, Serialization: add CUDAKernelCallExpr and related semantic actionsPeter Collingbourne2011-02-091-0/+1
| | | | llvm-svn: 125217
* Remove vtables from the Stmt hierarchy; this was pretty easy asJohn McCall2011-02-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | there were only three virtual methods of any significance. The primary way to grab child iterators now is with Stmt::child_range children(); Stmt::const_child_range children() const; where a child_range is just a std::pair of iterators suitable for being llvm::tie'd to some locals. I've left the old child_begin() and child_end() accessors in place, but it's probably a substantial penalty to grab the iterators individually now, since the switch-based dispatch is kindof inherently slower than vtable dispatch. Grabbing them together is probably a slight win over the status quo, although of course we could've achieved that with vtables, too. I also reclassified SwitchCase (correctly) as an abstract Stmt class, which (as the first such class that wasn't an Expr subclass) required some fiddling in a few places. There are somewhat gross metaprogramming hooks in place to ensure that new statements/expressions continue to implement getSourceRange() and children(). I had to work around a recent clang bug; dgregor actually fixed it already, but I didn't want to introduce a selfhosting dependency on ToT. llvm-svn: 125183
* Fix warnings found by gcc-4.6, from -Wunused-but-set-variable andJeffrey Yasskin2011-01-181-2/+1
| | | | | | -Wint-to-pointer-cast. llvm-svn: 123719
* Introduce a new expression kind, SubstNonTypeTemplateParmPackExpr,Douglas Gregor2011-01-151-0/+1
| | | | | | | | | that captures the substitution of a non-type template argument pack for a non-type template parameter pack within a pack expansion that cannot be fully expanded. This follows the approach taken by SubstTemplateTypeParmPackType. llvm-svn: 123506
* Implement the sizeof...(pack) expression to compute the length of aDouglas Gregor2011-01-041-0/+1
| | | | | | | | | parameter pack. Note that we're missing proper libclang support for the new SizeOfPackExpr expression node. llvm-svn: 122813
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-031-0/+1
| | | | | | | | | | | | | | | | | template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. llvm-svn: 122751
* Fix build.Anders Carlsson2010-12-091-1/+1
| | | | llvm-svn: 121341
* Remove extra namespace specifier.Ted Kremenek2010-12-091-1/+1
| | | | llvm-svn: 121334
* DenseMapInfo is a 'struct', not a 'class'.Ted Kremenek2010-12-091-1/+1
| | | | llvm-svn: 121321
* Add new libclang hooks for CXCursorSet, aTed Kremenek2010-12-081-0/+65
| | | | | | | DenseMap-backed hashtable for doing client-side management of CXCursors within a set. llvm-svn: 121318
* Remove the TypesCompatibleExprClass AST node. Merge its functionality into ↵Francois Pichet2010-12-081-1/+0
| | | | | | BinaryTypeTraitExpr. llvm-svn: 121298
* Type traits intrinsic implementation: __is_base_of(T, U)Francois Pichet2010-12-071-0/+1
| | | | | | New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics. llvm-svn: 121074
* Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoreticalJohn McCall2010-12-061-1/+1
| | | | | | reason this is limited to C++, and it's certainly not limited to temporaries. llvm-svn: 120996
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-021-2/+0
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Make definition of CXTranslationUnitImpl privateTed Kremenek2010-11-171-0/+1
| | | | | | to libclang. llvm-svn: 119585
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-161-20/+30
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* Move CXString creation/management routines intoTed Kremenek2010-11-161-0/+1
| | | | | | | their own .cpp file and make the interpretation of its flags private. llvm-svn: 119319
* Add a new expression kind, OpaqueValueExpr, which is useful forJohn McCall2010-11-151-0/+1
| | | | | | | certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow. llvm-svn: 119289
* Encapsulate within CXCursor the notion of whether a VarDecl* is the first ↵Ted Kremenek2010-11-011-2/+14
| | | | | | | | | | | | Decl in a DeclGroup. We use this to recover some context that is currently not modeled directly in the AST. Currently VarDecl's cannot properly determine their source range because they have no context on whether or not they appear in a DeclGroup. For the meantime, this bandaid suffices in libclang since that is where the correct SourceRange is directly needed. Fixes <rdar://problem/8595749>. llvm-svn: 117973
* Extend the preprocessing record and libclang with support forDouglas Gregor2010-10-201-0/+11
| | | | | | | | | inclusion directives, keeping track of every #include, #import, etc. in the translation unit. We keep track of the source location and kind of the inclusion, how the file name was spelled, and the underlying file to which the inclusion resolved. llvm-svn: 116952
* Eliminate usage of ObjCSuperExpr used forFariborz Jahanian2010-10-141-1/+0
| | | | | | | 'super' as receiver of property or a setter/getter methods. //rdar: //8525788 llvm-svn: 116483
* Introduce a new kind of cursor into libclang, which covers a referenceDouglas Gregor2010-09-131-0/+48
| | | | | | | | | to an "overloaded" set of declarations. This cursor kind works for unresolved references to functions/templates (e.g., a call within a template), using declarations, and Objective-C class and protocol forward declarations. llvm-svn: 113805
* Define and implement CXXNoexceptExpr. Create it in Sema.Sebastian Redl2010-09-101-0/+1
| | | | llvm-svn: 113623
* Add libclang support for label statements, gotos, and taking theDouglas Gregor2010-09-101-1/+22
| | | | | | address of a label (GNU extension). llvm-svn: 113564
* Teach libclang to walk the base and member initializers of aDouglas Gregor2010-09-091-0/+17
| | | | | | | | constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. llvm-svn: 113545
* Fix warnings caused by new CXXUuidofExprClass enumerator.Francois Pichet2010-09-081-0/+1
| | | | llvm-svn: 113444
* Synchronize code-completion cursor kinds with indexing cursorDouglas Gregor2010-09-031-65/+1
| | | | | | kinds. How shameful that this code was duplicated! llvm-svn: 113033
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-021-1/+0
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* Implement libclang support for using declarations. Clang actually usesDouglas Gregor2010-09-011-0/+5
| | | | | | | | | | | | | | | | 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
* Implement libclang support for using directives (cursor + visitation +Douglas Gregor2010-09-011-0/+1
| | | | | | | | 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-311-4/+24
| | | | | | | | | | | 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
* Extend libclang with a new cursor kind that indicates a reference to aDouglas Gregor2010-08-311-0/+16
| | | | | | | | | 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-311-0/+2
| | | | | | 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-311-0/+2
| | | | | | class templates. llvm-svn: 112627
* Implement basic support for indexing function templates inDouglas Gregor2010-08-311-0/+4
| | | | | | | | | | | | | | 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-311-0/+3
| | | | | | | | 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
* Implement CXCursor support for walking C++ base specifiers. This includes ↵Ted Kremenek2010-08-271-0/+10
| | | | | | | | adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier. Implements <rdar://problem/8274883>. llvm-svn: 112296
* Add libclang API hook "clang_getIBOutletCollectionType" to query the ↵Ted Kremenek2010-08-261-0/+4
| | | | | | collection type for iboutletcollection attributes. llvm-svn: 112139
* Reinstate the fix for PR7556. A silly use of isTrivial() wasDouglas Gregor2010-07-081-1/+1
| | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857
* Revert r107828 and r107827, the fix for PR7556, which seems to beDouglas Gregor2010-07-071-1/+1
| | | | | | breaking bootstrap on Linux. llvm-svn: 107837
* Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect itsDouglas Gregor2010-07-071-1/+1
| | | | | | newly-narrowed scope. No functionality change. llvm-svn: 107828
OpenPOWER on IntegriCloud