summaryrefslogtreecommitdiffstats
path: root/include/clang-c
Commit message (Collapse)AuthorAgeFilesLines
...
* [OpenMP] Initial implementation of parse and sema for composite pragma ↵Carlo Bertolli2016-06-241-1/+5
| | | | | | | | | | | | | | | | | 'distribute parallel for' http://reviews.llvm.org/D21564 This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273705 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert accidential "[MSVC] Late parsing of in-class defined member functions ↵Alexey Bataev2016-06-151-5/+1
| | | | | | | | in template" This reverts commit 0253605771b8bd9d414aba74fe2742c730d6fd1a. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272776 91177308-0d34-0410-b5e6-96231b3b80d8
* [MSVC] Late parsing of in-class defined member functions in templateAlexey Bataev2016-06-151-1/+5
| | | | | | | | | | | | | | | | | | | classes. MSVC actively uses unqualified lookup in dependent bases, lookup at the instantiation point (non-dependent names may be resolved on things declared later) etc. and all this stuff is the main cause of incompatibility between clang and MSVC. Clang tries to emulate MSVC behavior but it may fail in many cases. clang could store lexed tokens for member functions definitions within ClassTemplateDecl for later parsing during template instantiation. It will allow resolving many possible issues with lookup in dependent base classes and removing many already existing MSVC-specific hacks/workarounds from the clang code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272774 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sizeof and alignof a CXCursor_UnaryExprOlivier Goffart2016-06-091-1/+1
| | | | | | | | So we can match sizeof expressions more accurately than with UnexposedExpr Differential Revision: http://reviews.llvm.org/D18081 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272274 91177308-0d34-0410-b5e6-96231b3b80d8
* CIndex: add support for static_assertOlivier Goffart2016-06-091-1/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D18080 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272273 91177308-0d34-0410-b5e6-96231b3b80d8
* Bump libclang API minor version after r271351.Manman Ren2016-06-031-2/+2
| | | | | | | Also use the next enum value for CXObjCPropertyAttr_class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271747 91177308-0d34-0410-b5e6-96231b3b80d8
* Indexer: add CXObjCPropertyAttr_class for class properties.Manman Ren2016-05-311-1/+2
| | | | | | | rdar://25963227 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271351 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-c: Add the clang_getCursorVisibility() APIEhsan Akhgari2016-05-311-0/+26
| | | | | | | | | This patch adds an API for querying the visibility of the entity referred to by a cursor. Patch by Michael Wu <mwu@mozilla.com>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271292 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r253909 because it was committed with an incorrect messageEhsan Akhgari2016-05-311-26/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271291 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parsing and sema support for target update directiveSamuel Antao2016-05-261-2/+6
| | | | | | | | | | | | | | | Summary: This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch. This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`. This patch is based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D15944 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270878 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-c: de-anonymize structure declarationSaleem Abdulrasool2016-05-241-1/+1
| | | | | | | | | The statement constructed an anonymous structure which was typedefed. The anonymous structure has internal linkage, and that would cause an error when building with modules. Give the type declaration a tag name to address the error when building with modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270520 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable support for __float128 in Clang and enable it on pertinent platformsNemanja Ivanovic2016-05-091-0/+1
| | | | | | | | | | | | | | | | | | | This patch corresponds to reviews: http://reviews.llvm.org/D15120 http://reviews.llvm.org/D19125 It adds support for the __float128 keyword, literals and target feature to enable it. Based on the latter of the two aforementioned reviews, this feature is enabled on Linux on i386/X86 as well as SystemZ. This is also the second attempt in commiting this feature. The first attempt did not enable it on required platforms which caused failures when compiling type_traits with -std=gnu++11. If you see failures with compiling this header on your platform after this commit, it is likely that your platform needs to have this feature enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268898 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Expose the ElaboratedTypeSergey Kalinichev2016-05-031-1/+15
| | | | | | | Differential Revision: http://reviews.llvm.org/D11797 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268366 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose cxx constructor and method properties through libclang and python ↵Jonathan Coe2016-04-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | | bindings. Summary: I have exposed the following function through libclang and the clang.cindex python bindings: clang_CXXConstructor_isConvertingConstructor, clang_CXXConstructor_isCopyConstructor, clang_CXXConstructor_isDefaultConstructor, clang_CXXConstructor_isMoveConstructor, clang_CXXMethod_isDefaulted I need (some of) these methods for a C++ code model I am building in Python to drive a code generator. Reviewers: compnerd, skalinichev Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15469 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267706 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 266186 as it breaks anything that includes type_traits on some platformsNemanja Ivanovic2016-04-151-1/+0
| | | | | | | | | | | Since this patch provided support for the __float128 type but disabled it on all platforms by default, some platforms can't compile type_traits with -std=gnu++11 since there is a specialization with __float128. This reverts the patch until D19125 is approved (i.e. we know which platforms need this support enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266460 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-131-0/+1
| | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15120 It adds support for the __float128 keyword, literals and a target feature to enable it. This support is disabled by default on all targets and any target that has support for this type is free to add it. Based on feedback that I've received from target maintainers, this appears to be the right thing for most targets. I have not heard from the maintainers of X86 which I believe supports this type. I will subsequently investigate the impact of enabling this on X86. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266186 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo, Tiles -> Files, NFCVedant Kumar2016-03-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264218 91177308-0d34-0410-b5e6-96231b3b80d8
* Add attributes for preserve_mostcc/preserve_allcc calling conventions to the ↵Roman Levenstein2016-03-161-0/+2
| | | | | | | | | | | | | | | C/C++ front-end Till now, preserve_mostcc/preserve_allcc calling convention attributes were only available at the LLVM IR level. This patch adds attributes for preserve_mostcc/preserve_allcc calling conventions to the C/C++ front-end. The code was mostly written by Juergen Ributzka. I just added support for the AArch64 target and tests. Differential Revision: http://reviews.llvm.org/D18025 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263647 91177308-0d34-0410-b5e6-96231b3b80d8
* Bump libclang API version after r262318Kevin Funk2016-03-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262922 91177308-0d34-0410-b5e6-96231b3b80d8
* Semantic analysis for the swiftcall calling convention.John McCall2016-03-031-0/+1
| | | | | | | I've tried to keep the infrastructure behind parameter ABI treatments fairly general. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262587 91177308-0d34-0410-b5e6-96231b3b80d8
* Optionally demote fatal errors to non-fatal errors.Manuel Klimek2016-03-011-1/+12
| | | | | | | | | | | | | | | | | | This behavior is enabled when the new CXTranslationUnit_KeepGoing option is passed to clang_parseTranslationUnit{,2}. It is geared towards use by IDEs and similar consumers of the clang-c API where fatal errors may arise when parsing incomplete code mid-edit, or when include paths are not properly configured yet. In such situations one still wants to get as much information as possible about a TU. Previously, the semantic analysis would not instantiate templates or report additional fatal errors after the first fatal error was encountered. Fixes PR24268. Patch by Milian Wolff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262318 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add missing CINDEX_LINKAGE from a function.Argyrios Kyrtzidis2016-02-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260047 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parsing + sema for target parallel for directive.Arpith Chacko Jacob2016-02-031-1/+5
| | | | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel for directive along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16759 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259654 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove autoconf supportChris Bieneman2016-01-261-38/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258862 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parsing + sema for target parallel directive.Arpith Chacko Jacob2016-01-261-1/+5
| | | | | | | | | | | | | | | Summary: This patch adds parsing + sema for the target parallel directive and its clauses along with testcases. Reviewers: ABataev Differential Revision: http://reviews.llvm.org/D16553 Rebased to current trunk and updated test cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258832 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parsing + sema for "target exit data" directive.Samuel Antao2016-01-191-1/+5
| | | | | | | Patch by Arpith Jacob. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258177 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parsing + sema for "target enter data" directive.Samuel Antao2016-01-191-1/+5
| | | | | | | | Patch by Arpith Jacob. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258165 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add missing CINDEX_LINKAGE from some new APIs in Index.h.Argyrios Kyrtzidis2016-01-161-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257982 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce APIs for evaluating a cursor and checking if a macro is ↵Argyrios Kyrtzidis2016-01-161-1/+82
| | | | | | | | builtin/function. rdar://24091595 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257968 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add a flag to create the precompiled preamble on the first parse.Benjamin Kramer2015-12-151-1/+9
| | | | | | | | | | | | | | | | | | | | | Summary: The current default is to create the preamble on the first reparse, aka second parse. This is useful for clients that do not want to block when opening a file because serializing the preamble takes a bit of time. However, this makes the reparse much more expensive and that may be on the critical path as it's the first interaction a user has with the source code. YouCompleteMe currently optimizes for the first code interaction by parsing the file twice when loaded. That's just unnecessarily slow and this flag helps to avoid that. Reviewers: doug.gregor, klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15490 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255635 91177308-0d34-0410-b5e6-96231b3b80d8
* Add parse and sema of OpenMP distribute directive with all clauses except ↵Carlo Bertolli2015-12-141-1/+5
| | | | | | dist_schedule git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255498 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: expose dllexport, dllimport attributesSaleem Abdulrasool2015-12-101-2/+4
| | | | | | | These attributes were previously unexposed. Expose them through the libclang interfaces. Add tests that cover both the MSVC spelling and the GNU spelling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255273 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat linefeeds.NAKAMURA Takumi2015-12-091-14/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255098 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r255001, "Add parse and sema for OpenMP distribute directive and all ↵NAKAMURA Takumi2015-12-091-5/+1
| | | | | | | | its clauses excluding dist_schedule." It causes memory leak. Some tests in test/OpenMP would fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255094 91177308-0d34-0410-b5e6-96231b3b80d8
* Add parse and sema for OpenMP distribute directive and all its clauses ↵Carlo Bertolli2015-12-081-1/+5
| | | | | | excluding dist_schedule. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255001 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.5] Parsing/sema support for 'omp taskloop simd' directive.Alexey Bataev2015-12-031-1/+5
| | | | | | | OpenMP 4.5 adds directive 'taskloop simd'. Patch adds parsing/sema analysis for 'taskloop simd' directive and its clauses. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254597 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.5] Parsing/sema analysis for 'taskloop' directive.Alexey Bataev2015-12-011-1/+5
| | | | | | | Adds initial parsing and semantic analysis for 'taskloop' directive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@254367 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-c/Index.h: Move \brief. [-Wdocumentation]NAKAMURA Takumi2015-11-231-11/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253932 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a warning about commas at the end of enumerator lists.Chad Rosier2015-11-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253914 91177308-0d34-0410-b5e6-96231b3b80d8
* Make clang_Cursor_getMangling not mangle if the declaration isn't mangledEhsan Akhgari2015-11-231-0/+26
| | | | | | | | | | | | | Right now clang_Cursor_getMangling will attempt to mangle any declaration, even if the declaration isn't mangled (extern C). This results in a partially mangled name which isn't useful for much. This patch makes clang_Cursor_getMangling return an empty string if the declaration isn't mangled. Patch by Michael Wu <mwu@mozilla.com>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253909 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add entry points that take a full command line including argv[0].Benjamin Kramer2015-11-181-0/+23
| | | | | | | | | | | | This provides both a more uniform interface and makes libclang behave like clang tooling wrt relative paths against argv[0]. This is necessary for finding paths to a c++ standard library relative to a clang binary given in a compilation database. It can also be used to find paths relative to libclang.so if the full path to it is passed in. Differential Revision: http://reviews.llvm.org/D14695 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253466 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Visit TypeAliasTemplateDeclSergey Kalinichev2015-11-151-1/+2
| | | | | | | | | This makes TypeAliasTemplateDecl accessible via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13844 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253166 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Expose AutoTypeSergey Kalinichev2015-11-151-1/+2
| | | | | | | | | Expose the AutoType via LibClang and python bindings Differential Revision: http://reviews.llvm.org/D13000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253165 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: add clang_Cursor_getCXXManglingsSaleem Abdulrasool2015-11-121-0/+6
| | | | | | | | | This function permits the mangling of a C++ 'structor. Depending on the ABI and the declaration, the declaration may contain more than one associated symbol for a given declaration. This allows the consumer to retrieve all of the associated symbols for the declaration the cursor points to. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252853 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: add new StringSet typeSaleem Abdulrasool2015-11-121-0/+10
| | | | | | | This allows the return of a set of CXStrings from libclang. This is setup work for an upcoming change to permit returning multiple mangled symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252852 91177308-0d34-0410-b5e6-96231b3b80d8
* Index: expose is_mutable_fieldSaleem Abdulrasool2015-10-271-0/+5
| | | | | | | | Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251410 91177308-0d34-0410-b5e6-96231b3b80d8
* [tooling] In CompileCommand, Expose the 'file' that was associated with the ↵Argyrios Kyrtzidis2015-09-111-0/+6
| | | | | | command. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247468 91177308-0d34-0410-b5e6-96231b3b80d8
* Index: expose visibility attributeSaleem Abdulrasool2015-09-051-2/+3
| | | | | | | Expose the previously unexposed visibility attribute via the python and C bindings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246931 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.0] Initial support for array sections.Alexey Bataev2015-08-251-1/+5
| | | | | | | | | Adds parsing/sema analysis/serialization/deserialization for array sections in OpenMP constructs (introduced in OpenMP 4.0). Currently it is allowed to use array sections only in OpenMP clauses that accepts list of expressions. Differential Revision: http://reviews.llvm.org/D10732 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@245937 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: Add period to typedef kind docblockSaleem Abdulrasool2015-08-121-1/+1
| | | | | | | | | | All of the other docblocks for the CXCursor_* cursor kind enum values include documentation that ends with a period. Add a period to the end of the CXCursor_TypedefDecl documentation to follow this convention. Patch by Brian Gesiak! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244715 91177308-0d34-0410-b5e6-96231b3b80d8