summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* Add explicit (void) cast to result of unique_ptr::release()Eric Fiselier2016-11-141-1/+1
| | | | llvm-svn: 286796
* [index] Rename SymbolSubKind -> SymbolProperty, NFC.Argyrios Kyrtzidis2016-11-111-6/+6
| | | | | | This better reflects what it represents. llvm-svn: 286680
* [libclang] Fix issue with clang_tokenize and make sure it interprets ↵Argyrios Kyrtzidis2016-11-091-1/+1
| | | | | | | | CXSourceRange as half-open character range. Patch provided by Emilio Cobos Álvarez! (https://reviews.llvm.org/D26446) llvm-svn: 286421
* Replace TimeValue with TimePoint in BuildSystem.cpp. NFC.Pavel Labath2016-11-091-2/+2
| | | | llvm-svn: 286357
* [index] Expose FriendDeclOlivier Goffart2016-11-042-1/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D26285 llvm-svn: 285984
* regcall: Implement regcall Calling Conv in clangErich Keane2016-11-021-0/+1
| | | | | | | | | | This patch implements the register call calling convention, which ensures as many values as possible are passed in registers. CodeGen changes were committed in https://reviews.llvm.org/rL284108. Differential Revision: https://reviews.llvm.org/D25204 llvm-svn: 285849
* Re-apply patch r279045.Kelvin Li2016-10-252-0/+12
| | | | llvm-svn: 285066
* Replace uses of LLVM_FUNCTION_NAME with __func__, this was macro was removed ↵Erik Pilkington2016-10-203-4/+4
| | | | | | from llvm/Support in r284681 llvm-svn: 284690
* Store FileEntry::Filename as a StringRef instead of raw pointer (NFC)Mehdi Amini2016-10-101-3/+4
| | | | llvm-svn: 283815
* ObjectiveC generics: Add ObjCTypeParamType in the type system.Manman Ren2016-09-131-0/+12
| | | | | | | | | | | | | | | | | We also need to add ObjCTypeParamTypeLoc. ObjCTypeParamType supports the representation of "T <protocol>" where T is a type parameter. Before this, we use TypedefType to represent the type parameter for ObjC. ObjCTypeParamType has "ObjCTypeParamDecl *OTPDecl" and it extends from ObjCProtocolQualifiers. It is a non-canonical type and is canonicalized to the underlying type with the protocol qualifiers. rdar://24619481 rdar://25060179 Differential Revision: http://reviews.llvm.org/D23079 llvm-svn: 281355
* Handle empty message in static_asserts.Richard Trieu2016-09-131-2/+3
| | | | llvm-svn: 281287
* C++ Modules TS: Add parsing and some semantic analysis support forRichard Smith2016-09-081-0/+1
| | | | | | | export-declarations. These don't yet have an effect on name visibility; we still export everything by default. llvm-svn: 280999
* When we reach the end of a #include of a header of a local submodule that weRichard Smith2016-09-011-0/+8
| | | | | | | | | | textually included, create an ImportDecl just as we would if we reached a #include of any other modular header. This is necessary in order to correctly determine the set of variables to initialize for an imported module. This should hopefully make the modules selfhost buildbot green again. llvm-svn: 280409
* [libclang] Added missing entry for newly introduced ↵Cameron Desrochers2016-08-181-0/+1
| | | | | | 'clang_getAllSkippedRanges' to libclang.exports llvm-svn: 279092
* [libclang] Add clang_getAllSkippedRanges functionCameron Desrochers2016-08-181-0/+27
| | | | | | | | | | This complements the clang_getSkippedRanges function which returns skipped ranges filtered by a specific file. This function is useful when all the ranges are desired (and a lot more efficient than the equivalent of asking for the ranges file by file, since the implementation of clang_getSkippedRanges iterates over all ranges anyway). Differential Revision: https://reviews.llvm.org/D20132 llvm-svn: 279076
* Revert "[OpenMP] Sema and parsing for 'teams distribute simd’ pragma"Diana Picus2016-08-182-12/+0
| | | | | | | | | | | | | | | | | This reverts commit r279003 as it breaks some of our buildbots (e.g. clang-cmake-aarch64-quick, clang-x86_64-linux-selfhost-modules). The error is in OpenMP/teams_distribute_simd_ast_print.cpp: clang: /home/buildslave/buildslave/clang-cmake-aarch64-quick/llvm/include/llvm/ADT/DenseMap.h:527: bool llvm::DenseMapBase<DerivedT, KeyT, ValueT, KeyInfoT, BucketT>::LookupBucketFor(const LookupKeyT&, const BucketT*&) const [with LookupKeyT = clang::Stmt*; DerivedT = llvm::DenseMap<clang::Stmt*, long unsigned int>; KeyT = clang::Stmt*; ValueT = long unsigned int; KeyInfoT = llvm::DenseMapInfo<clang::Stmt*>; BucketT = llvm::detail::DenseMapPair<clang::Stmt*, long unsigned int>]: Assertion `!KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, TombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!"' failed. llvm-svn: 279045
* [OpenMP] Sema and parsing for 'teams distribute simd’ pragmaKelvin Li2016-08-172-0/+12
| | | | | | | | | | This patch is to implement sema and parsing for 'teams distribute simd’ pragma. This patch is originated by Carlo Bertolli. Differential Revision: https://reviews.llvm.org/D23528 llvm-svn: 279003
* [OpenMP] Sema and parsing for 'teams distribute' pragmaKelvin Li2016-08-052-0/+11
| | | | | | | | This patch is to implement sema and parsing for 'teams distribute' pragma. Differential Revision: https://reviews.llvm.org/D23189 llvm-svn: 277818
* P0217R3: Parsing support and framework for AST representation of C++1zRichard Smith2016-07-221-1/+3
| | | | | | | | | | | decomposition declarations. There are a couple of things in the wording that seem strange here: decomposition declarations are permitted at namespace scope (which we partially support here) and they are permitted as the declaration in a template (which we reject). llvm-svn: 276492
* [OpenMP] Sema and parsing for 'target simd' pragmaKelvin Li2016-07-202-0/+11
| | | | | | | | This patch is to implement sema and parsing for 'target simd' pragma. Differential Revision: https://reviews.llvm.org/D22479 llvm-svn: 276203
* [NFC] Header cleanupMehdi Amini2016-07-1812-34/+9
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 llvm-svn: 275882
* [ObjC] Implement @available in the Parser and ASTErik Pilkington2016-07-162-1/+7
| | | | | | | | | | | | | | | | This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the Parser and Sema to generate it. This node represents an availability check of the form: @available(macos 10.10, *); Which will eventually compile to a runtime check of the host's OS version. This is the first patch of the feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential Revision: https://reviews.llvm.org/D22171 llvm-svn: 275654
* [index] Create different USR if a property is a class property.Argyrios Kyrtzidis2016-07-151-1/+1
| | | | | | Avoids USR conflicts between class & instance properties of the same name. llvm-svn: 275630
* [OpenMP] Sema and parsing for 'target parallel for simd' pragmaKelvin Li2016-07-142-0/+12
| | | | | | | | This patch is to implement sema and parsing for 'target parallel for simd' pragma. Differential Revision: http://reviews.llvm.org/D22096 llvm-svn: 275365
* [OpenMP] Initial implementation of parse+sema for OpenMP clause ↵Carlo Bertolli2016-07-131-0/+3
| | | | | | | | 'is_device_ptr' of target http://reviews.llvm.org/D22070 llvm-svn: 275282
* [OpenMP] Initial implementation of parse+sema for clause use_device_ptr of ↵Carlo Bertolli2016-07-131-0/+3
| | | | | | | | | | | | | | 'target data' http://reviews.llvm.org/D21904 This patch is similar to the implementation of 'private' clause: it adds a list of private pointers to be used within the target data region to store the device pointers returned by the runtime. Please refer to the following document for a full description of what the runtime witll return in this case (page 10 and 11): https://github.com/clang-omp/OffloadingDesign I am happy to answer any question related to the runtime interface to help reviewing this patch. llvm-svn: 275271
* [AST] Use ArrayRef in more interfacesDavid Majnemer2016-07-071-4/+2
| | | | | | | | | ArrayRef is a little better than passing around a pointer/length pair. No functional change is intended. llvm-svn: 274732
* [OpenMP] Sema and parsing for 'distribute simd' pragmaKelvin Li2016-07-062-0/+11
| | | | | | | | Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'. Differential Revision: http://reviews.llvm.org/D22007 llvm-svn: 274604
* [OpenMP] Sema and parse for 'distribute parallel for simd'Kelvin Li2016-07-052-0/+12
| | | | | | | | Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute parallel for simd'. Differential Revision: http://reviews.llvm.org/D21977 llvm-svn: 274530
* [libclang] Sync-up the way top-level decls in an ASTUnit are handled with ↵Argyrios Kyrtzidis2016-07-012-32/+45
| | | | | | | | how decls in a DeclContext are handled. rdar://19775013 llvm-svn: 274378
* AMDGPU: Set amdgpu_kernel calling convention for OpenCL kernels.Nikolay Haustov2016-06-301-1/+1
| | | | | | | | | | | | | | | | | | Summary: Summary: Change Clang calling convention SpirKernel to OpenCLKernel. Set calling convention OpenCLKernel for amdgcn as well. Add virtual method .getOpenCLKernelCallingConv() to TargetCodeGenInfo and use it to set target calling convention for AMDGPU and SPIR. Update tests. Reviewers: rsmith, tstellarAMD, Anastasia, yaxunl Subscribers: kzhuravl, cfe-commits Differential Revision: http://reviews.llvm.org/D21367 llvm-svn: 274220
* P0136R1, DR1573, DR1645, DR1715, DR1736, DR1903, DR1941, DR1959, DR1991:Richard Smith2016-06-282-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace inheriting constructors implementation with new approach, voted into C++ last year as a DR against C++11. Instead of synthesizing a set of derived class constructors for each inherited base class constructor, we make the constructors of the base class visible to constructor lookup in the derived class, using the normal rules for using-declarations. For constructors, UsingShadowDecl now has a ConstructorUsingShadowDecl derived class that tracks the requisite additional information. We create shadow constructors (not found by name lookup) in the derived class to model the actual initialization, and have a new expression node, CXXInheritedCtorInitExpr, to model the initialization of a base class from such a constructor. (This initialization is special because it performs real perfect forwarding of arguments.) In cases where argument forwarding is not possible (for inalloca calls, variadic calls, and calls with callee parameter cleanup), the shadow inheriting constructor is not emitted and instead we directly emit the initialization code into the caller of the inherited constructor. Note that this new model is not perfectly compatible with the old model in some corner cases. In particular: * if B inherits a private constructor from A, and C uses that constructor to construct a B, then we previously required that A befriends B and B befriends C, but the new rules require A to befriend C directly, and * if a derived class has its own constructors (and so its implicit default constructor is suppressed), it may still inherit a default constructor from a base class llvm-svn: 274049
* Resubmission of http://reviews.llvm.org/D21564 after fixes.Carlo Bertolli2016-06-272-0/+12
| | | | | | | | | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' 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. llvm-svn: 273884
* Revert r273705Carlo Bertolli2016-06-242-12/+0
| | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' llvm-svn: 273709
* [OpenMP] Initial implementation of parse and sema for composite pragma ↵Carlo Bertolli2016-06-242-0/+12
| | | | | | | | | | | | | | | '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. llvm-svn: 273705
* Use more ArrayRefsDavid Majnemer2016-06-241-2/+2
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273647
* Use ranges to concisely express iterationDavid Majnemer2016-06-231-11/+10
| | | | | | | No functional change is intended, this should just clean things up a little. llvm-svn: 273522
* Revert accidential "[MSVC] Late parsing of in-class defined member functions ↵Alexey Bataev2016-06-152-6/+0
| | | | | | | | in template" This reverts commit 0253605771b8bd9d414aba74fe2742c730d6fd1a. llvm-svn: 272776
* [MSVC] Late parsing of in-class defined member functions in templateAlexey Bataev2016-06-152-0/+6
| | | | | | | | | | | | | | | | | | | 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. llvm-svn: 272774
* 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 llvm-svn: 272274
* CIndex: add support for static_assertOlivier Goffart2016-06-092-0/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D18080 llvm-svn: 272273
* Update to match LLVM r272232.Richard Smith2016-06-091-1/+2
| | | | llvm-svn: 272233
* Indexer: add CXObjCPropertyAttr_class for class properties.Manman Ren2016-05-311-0/+2
| | | | | | rdar://25963227 llvm-svn: 271351
* clang-c: Add the clang_getCursorVisibility() APIEhsan Akhgari2016-05-312-0/+22
| | | | | | | | | This patch adds an API for querying the visibility of the entity referred to by a cursor. Patch by Michael Wu <mwu@mozilla.com>. llvm-svn: 271292
* Revert r253909 because it was committed with an incorrect messageEhsan Akhgari2016-05-312-22/+0
| | | | llvm-svn: 271291
* Apply clang-tidy's misc-move-constructor-init throughout Clang.Benjamin Kramer2016-05-272-3/+6
| | | | | | No functionality change intended, maybe a tiny performance improvement. llvm-svn: 270996
* [OpenMP] Parsing and sema support for the from clauseSamuel Antao2016-05-261-0/+3
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `from` clause. Patch 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/D18488 llvm-svn: 270882
* [OpenMP] Parsing and sema support for the to clauseSamuel Antao2016-05-261-0/+3
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `to` clause. Patch based on the original post by Kelvin Li. Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18597 llvm-svn: 270880
* [OpenMP] Parsing and sema support for target update directiveSamuel Antao2016-05-262-0/+5
| | | | | | | | | | | | | | | 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 llvm-svn: 270878
* Enable support for __float128 in Clang and enable it on pertinent platformsNemanja Ivanovic2016-05-091-0/+2
| | | | | | | | | | | | | | | | | | 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. llvm-svn: 268898
OpenPOWER on IntegriCloud