summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CXCursor.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Parsing and sema analysis for 'omp task' directive.Alexey Bataev2014-07-111-0/+3
| | | | llvm-svn: 212804
* [OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.Alexey Bataev2014-07-081-0/+3
| | | | llvm-svn: 212516
* [OPENMP] Added initial support for 'omp parallel for'.Alexey Bataev2014-07-071-0/+3
| | | | llvm-svn: 212453
* Switch over a few uses of param_begin() to parameters()Alp Toker2014-07-071-2/+2
| | | | llvm-svn: 212442
* Add an AST node for __leave statements, hook it up.Nico Weber2014-07-071-0/+4
| | | | | | | Codegen is still missing (and I won't work on that), but __leave is now as implemented as __try and friends. llvm-svn: 212425
* [OPENMP] Initial parsing and sema analysis for 'single' directive.Alexey Bataev2014-06-261-0/+3
| | | | llvm-svn: 211774
* [OPENMP] Initial parsing and sema analysis for 'section' directive.Alexey Bataev2014-06-261-0/+3
| | | | llvm-svn: 211767
* [OPENMP] Initial support for 'sections' directive.Alexey Bataev2014-06-251-0/+3
| | | | llvm-svn: 211685
* [OPENMP] Initial support for '#pragma omp for' (fixed incompatibility with ↵Alexey Bataev2014-06-181-0/+3
| | | | | | MSVC). llvm-svn: 211140
* Revert "[OPENMP] Initial support for '#pragma omp for'."Rafael Espindola2014-06-171-3/+0
| | | | | | | | This reverts commit r211096. Looks like it broke the msvc build: SemaOpenMP.cpp(140) : error C4519: default template arguments are only allowed on a class template llvm-svn: 211113
* [OPENMP] Initial support for '#pragma omp for'.Alexey Bataev2014-06-171-0/+3
| | | | llvm-svn: 211096
* [C++11] Use 'nullptr'. Tools edition.Craig Topper2014-06-081-16/+16
| | | | llvm-svn: 210422
* Expose CUDA function attributes to the C interface.Eli Bendersky2014-05-281-0/+4
| | | | | | | | Until now all CUDA-specific attributes were represented with CXCursor_UnexposedAttr; now they are actually implemented, including the Python bindings. llvm-svn: 209767
* [libclang] Add attribute support for 'pure', 'const' and 'noduplicate'.Joey Gouly2014-05-011-0/+3
| | | | | | This bumps CINDEX_VERSION_MINOR up (to 26). llvm-svn: 207767
* [OPENMP] First changes for Parsing and Sema for 'omp simd' directive supportAlexey Bataev2014-02-271-2/+4
| | | | llvm-svn: 202360
* Eliminate UnaryTypeTraitExprAlp Toker2014-01-011-1/+0
| | | | | | | | | | | | | Remove UnaryTypeTraitExpr and switch all remaining type trait related handling over to TypeTraitExpr. The UTT/BTT/TT enum prefix and evaluation code is retained pending further cleanup. This is part of the ongoing work to unify type traits following the removal of BinaryTypeTraitExpr in r197273. llvm-svn: 198271
* Eliminate BinaryTypeTraitExprAlp Toker2013-12-131-1/+0
| | | | | | | | | | | | | | | | | There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
* [libclang] Provide location for attributes and expose 'packed' attribute.Argyrios Kyrtzidis2013-09-251-0/+1
| | | | | | Patch by Loïc Jaquemet! llvm-svn: 191345
* Add the intrinsic __builtin_convertvectorHal Finkel2013-09-181-0/+1
| | | | | | | | | | | | | | | | | | LLVM supports applying conversion instructions to vectors of the same number of elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to cause such instructions to be generated when using builtin vector types. C-style casting on vectors is already defined in terms of bitcasts, and so cannot be used for these conversions as well (without leading to a very confusing set of semantics). As a result, this adds a __builtin_convertvector intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is intended to aid the creation of vector intrinsic headers that create generic IR instead of target-dependent intrinsics (in other words, this is a generic _mm_cvtepi32_ps). As noted in the documentation, the action of __builtin_convertvector is defined in terms of the action of a C-style cast on each vector element. llvm-svn: 190915
* Remove unnecessary inclusion of Sema.hDavid Blaikie2013-09-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let me tell you a tale... Within some twisted maze of debug info I've ended up implementing an insane man's Include What You Use device. When the debugger emits debug info it really shouldn't, I find out why & then realize the code could be improved too. In this instance CIndexDiagnostics.cpp had a lot more debug info with Clang than GCC. Upon inspection a major culprit was all the debug info describing clang::Sema. This was emitted because clang::Sema is befriended by DiagnosticEngine which was rightly required, but GCC doesn't emit debug info for friends so it never emitted anything for Clang. Clang does emit debug info for friends (will be fixed/changed to reduce debug info size). But why didn't Clang just emit a declaration of Sema if this entire TU didn't require a definition? 1) Diagnostic.h did the right thing, only using a declaration of Sema and not including Sema.h at all. 2) Some other dependency of CIndexDiagnostics.cpp didn't do the right thing. ASTUnit.h, only needing a declaration, still included Sema.h (hence this commit which removes that include and adds the necessary includes to the cpp files that were relying on this) 3) -flimit-debug-info didn't save us because of EnterExpressionEvaluationContext, defined inline in Sema.h which fires the "requiresCompleteType" check/flag (since it uses nested types from Sema and calls Sema member functions) and thus, if debug info is ever emitted for the type, the whole type is emitted and not just a declaration. Improving -flimit-debug-info to account for this would be... hard. Modifying the code so that's not 'required to be complete' might be possible, but probably only by moving EnterExpressionEvaluationContext either into Sema, or out of Sema.h. That might be a bit too much of a contortion to be bothered with. Also, this is only one of the cases where emitting debug info for friends caused us to emit a lot more debug info (this change reduces Clang's DWO size by 0.93%, dropping friends entirely reduces debug info by 3.2%) - I haven't hunted down the other cases, but I assume they might be similar (Sema or something like it). IWYU or a similar tool might help us reduce build times a bit, but analyzing debug info to find these differences isn't worthwhile. I'll take the 3.2% win, provide this small improvement to the code itself, and move on. llvm-svn: 190715
* OpenMP: basic support for #pragma omp parallelAlexey Bataev2013-07-191-0/+4
| | | | llvm-svn: 186647
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-041-3/+3
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185610
* PR12086, PR15117Richard Smith2013-06-121-0/+1
| | | | | | | | | | | | | | | | | | | Introduce CXXStdInitializerListExpr node, representing the implicit construction of a std::initializer_list<T> object from its underlying array. The AST representation of such an expression goes from an InitListExpr with a flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr). This more detailed representation has several advantages, the most important of which is that the new MaterializeTemporaryExpr allows us to directly model lifetime extension of the underlying temporary array. Using that, this patch *drastically* simplifies the IR generation of this construct, provides IR generation support for nested global initializer_list objects, fixes several bugs where the destructors for the underlying array would accidentally not get invoked, and provides constant expression evaluation support for std::initializer_list objects. llvm-svn: 183872
* Fix typo in comparison in clang_CXCursorSet_contains().Ted Kremenek2013-04-241-1/+1
| | | | | | | | | | Fixes PR 10124. Patch by Jens Kilian. Thanks to Nikola Smiljanic for following up. llvm-svn: 180177
* Revert "Remove CXCursorSet and related APIs. There are no known clients."Ted Kremenek2013-04-241-0/+66
| | | | | | Apparently there are... llvm-svn: 180176
* Remove CXCursorSet and related APIs. There are no known clients.Ted Kremenek2013-04-241-66/+0
| | | | llvm-svn: 180174
* [libclang] Introduce a CXCursor_ObjCSelfExpr cursor, which is the equivalent ↵Argyrios Kyrtzidis2013-04-231-1/+15
| | | | | | | | of CXCursor_CXXThisExpr for C++ code. rdar://13717006 llvm-svn: 180127
* C++1y: Allow aggregates to have default initializers.Richard Smith2013-04-201-0/+1
| | | | | | | | | | | Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in CXXCtorInitializers and in InitListExprs to represent a default initializer. There's an additional complication here: because the default initializer can refer to the initialized object via its 'this' pointer, we need to make sure that 'this' points to the right thing within the evaluation. llvm-svn: 179958
* Implement CapturedStmt ASTTareq A. Siraj2013-04-161-0/+4
| | | | | | | | | | | | | | | CapturedStmt can be used to implement generic function outlining as described in http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. CapturedStmt is not exposed to the C api. Serialization and template support are pending. Author: Wei Pan <wei.pan@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D370 llvm-svn: 179615
* Basic support for Microsoft property declarations andJohn McCall2013-04-161-0/+1
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* [libclang] Make clang_Cursor_getArgument work with call-exprs.Argyrios Kyrtzidis2013-04-011-0/+18
| | | | | | Patch by Matthias Kleine! llvm-svn: 178475
* Replace TypeLoc llvm::cast support to be well-defined.David Blaikie2013-02-181-1/+1
| | | | | | | | | | | | | | The TypeLoc hierarchy used the llvm::cast machinery to perform undefined behavior by casting pointers/references to TypeLoc objects to derived types and then using the derived copy constructors (or even returning pointers to derived types that actually point to the original TypeLoc object). Some context is in this thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056804.html Though it's spread over a few months which can be hard to read in the mail archive. llvm-svn: 175462
* libclang: remove reinterpret_casts by using SourceLocation::getPtrEncodingDmitri Gribenko2013-02-161-14/+14
| | | | llvm-svn: 175333
* libclang: remove reinterpret_casts by using SourceLocation::getFromPtrEncodingDmitri Gribenko2013-02-141-24/+12
| | | | | | directly instead of casting a pointer to an integer llvm-svn: 175206
* Allow the computation of the base priority for a declaration code completion ↵Douglas Gregor2013-01-311-1/+1
| | | | | | result to consider the completion context llvm-svn: 174037
* libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)Dmitri Gribenko2013-01-261-1/+1
| | | | | | into a getter cxtu::getASTUnit(TU) llvm-svn: 173585
* libclang: make getCursorParentDecl() return 'const Decl *'Dmitri Gribenko2013-01-261-2/+2
| | | | llvm-svn: 173584
* libclang: change getCursorAttr() to return 'const Attr *'Dmitri Gribenko2013-01-261-2/+2
| | | | llvm-svn: 173583
* libclang: make getCursorStmt() and getCursorExpr() return const pointersDmitri Gribenko2013-01-261-6/+7
| | | | | | Also change EnqueueVisitor to use ConstStmtVisitor as a consequence. llvm-svn: 173577
* libclang: change return type of getCursorDecl() to 'const Decl *'Dmitri Gribenko2013-01-231-10/+10
| | | | llvm-svn: 173278
* Explicitly cast away the const-ness instead of doing it implicitly.Bill Wendling2013-01-231-4/+4
| | | | llvm-svn: 173241
* libclang: remove a few const_castsDmitri Gribenko2013-01-141-3/+3
| | | | llvm-svn: 172373
* Constify argument of Preprocessor::getMacroInfoHistory and propagate toDmitri Gribenko2013-01-141-1/+1
| | | | | | callers, removing unneeded const_cast llvm-svn: 172372
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* libclang: remove unneeded castsDmitri Gribenko2013-01-111-9/+9
| | | | llvm-svn: 172253
* libclang: change CXCursor to store 'const void *' pointers forDmitri Gribenko2013-01-111-33/+36
| | | | | | const-correctness, and update all users llvm-svn: 172252
* libclang: use getCursorTU and getCursorASTUnit instead of explicit castsDmitri Gribenko2013-01-111-1/+1
| | | | llvm-svn: 172241
* [libclang] When getting the cursor for an identifier inside a macro ↵Argyrios Kyrtzidis2013-01-071-3/+22
| | | | | | | | | | | | | | | definition, check if this was ever a macro name and return a specific CXCursor_MacroExpansion cursor in such a case, instead of the generic CXCursor_MacroDefinition. Checking for macro name makes sure the identifier is not part of the identifier list in a function macro. While, in general, resolving identifiers in macro definitions to other macros may not be completely accurate, it greatly improves functionality such as give-me-the-definition-of-this, which was not working at all inside macro definitions. llvm-svn: 171773
* Sort #include lines for tools/...Chandler Carruth2012-12-041-3/+3
| | | | | | Completely automated with sort_includes.py llvm-svn: 169240
* [libclang] Introduce clang_Cursor_getReceiverType which returns the CXType forArgyrios Kyrtzidis2012-11-011-0/+13
| | | | | | | | the receiver of an ObjC message expression. rdar://12578643 llvm-svn: 167201
OpenPOWER on IntegriCloud