summaryrefslogtreecommitdiff
path: root/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang] Switch to LLVM_ENABLE_IDEShoaib Meenai2019-02-201-2/+2
| | | | | | | | | | | | r344555 switched LLVM to guarding install targets with LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES, which expresses the intent more directly and can be overridden by a user. Make the corresponding change in clang. LLVM_ENABLE_IDE is computed by HandleLLVMOptions, so it should be available for both standalone and integrated builds. Differential Revision: https://reviews.llvm.org/D58284 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354525 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add attribute support for 'convergent'.Sven van Haastregt2019-02-112-1/+4
| | | | | | | | | | This bumps CINDEX_VERSION_MINOR up (to 51). Patch by Hsin-Hsiao Lin. Differential Revision: https://reviews.llvm.org/D57946 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353690 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive.Michael Kruse2019-02-011-0/+1
| | | | | | | | | | | | | | | | | This patch implements parsing and sema for "omp declare mapper" directive. User defined mapper, i.e., declare mapper directive, is a new feature in OpenMP 5.0. It is introduced to extend existing map clauses for the purpose of simplifying the copy of complex data structures between host and device (i.e., deep copy). An example is shown below: struct S { int len; int *d; }; #pragma omp declare mapper(struct S s) map(s, s.d[0:s.len]) // Memory region that d points to is also mapped using this mapper. Contributed-by: Lingda Li <lildmh@gmail.com> Differential Revision: https://reviews.llvm.org/D56326 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352906 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix -DBUILD_SHARED_LIBS=on build after rC352803Fangrui Song2019-02-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352872 91177308-0d34-0410-b5e6-96231b3b80d8
* Make clang/test/Index/pch-from-libclang.c pass in more placesNico Weber2019-01-311-5/+4
| | | | | | | | | | | | | | | | - fixes the test on macOS with LLVM_ENABLE_PIC=OFF - together with D57343, gets the test to pass on Windows - makes it run everywhere (it seems to just pass on Linux) The main change is to pull out the resource directory computation into a function shared by all 3 places that do it. In CIndexer.cpp, this now works no matter if libclang is in lib/ or bin/ or statically linked to a binary in bin/. Differential Revision: https://reviews.llvm.org/D57345 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352803 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang][OpenMP] OMPFlushClause is synthetic, no such clause existsRoman Lebedev2019-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in https://reviews.llvm.org/D57112#inline-506781, 'flush' clause does not exist in the OpenMP spec, it can not be specified, and `OMPFlushClause` class is just a helper class. Therefore `OPENMP_CLAUSE()` in `clang/Basic/OpenMPKinds.def` should not contain 'flush' "clause". I have simply removed the `OPENMP_CLAUSE(flush, OMPFlushClause)` from `clang/Basic/OpenMPKinds.def`, grepped for `OPENMP_CLAUSE` and added `OPENMP_CLAUSE(flush, OMPFlushClause)` back to the **every** place where `OPENMP_CLAUSE` is defined and `clang/Basic/OpenMPKinds.def` is then included. So as-is, this patch is a NFC. Possibly, some of these `OPENMP_CLAUSE(flush, OMPFlushClause)` should be dropped, i don't really know. Test plan: `ninja check-clang` Reviewers: ABataev Reviewed By: ABataev Subscribers: guansong, arphaman, cfe-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D57280 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352390 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getTypeQualifiers to getMethodQualifiers.Anastasia Stulova2019-01-281-1/+1
| | | | | | | | | | Use more descriptive name for the method qualifiers getter. Differential Revision: https://reviews.llvm.org/D56792 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352349 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix build on Windows with LLVM_ENABLE_PIC=OFFNico Weber2019-01-251-1/+1
| | | | | | | | | | | | | | | libclang can be built in shared or static mode. On Windows, with LLVM_ENABLE_PIC=OFF, it was built in neither mode, leading to clients of libclang (c-index-test, c-arcmt-test) failing to link with it set. Since PIC isn't really a thing on Windows, build libclang in shared mode when LLVM_ENABLE_PIC=OFF there. This is also somewhat symmetric with the existing ENABLE_STATIC a few lines down. Differential Revision: https://reviews.llvm.org/D57258 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352253 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] Fix Modified Type in address_space AttributedTypeLeonard Chan2019-01-241-1/+3
| | | | | | | | | | | This is a fix for https://reviews.llvm.org/D51229 where we pass the address_space qualified type as the modified type of an AttributedType. This change now instead wraps the AttributedType with either the address_space qualifier or a DependentAddressSpaceType. Differential Revision: https://reviews.llvm.org/D55447 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351997 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...>Serge Guelton2019-01-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noted in https://bugs.llvm.org/show_bug.cgi?id=36651, the specialization for isPodLike<std::pair<...>> did not match the expectation of std::is_trivially_copyable which makes the memcpy optimization invalid. This patch renames the llvm::isPodLike trait into llvm::is_trivially_copyable. Unfortunately std::is_trivially_copyable is not portable across compiler / STL versions. So a portable version is provided too. Note that the following specialization were invalid: std::pair<T0, T1> llvm::Optional<T> Tests have been added to assert that former specialization are respected by the standard usage of llvm::is_trivially_copyable, and that when a decent version of std::is_trivially_copyable is available, llvm::is_trivially_copyable is compared to std::is_trivially_copyable. As of this patch, llvm::Optional is no longer considered trivially copyable, even if T is. This is to be fixed in a later patch, as it has impact on a long-running bug (see r347004) Note that GCC warns about this UB, but this got silented by https://reviews.llvm.org/D50296. Differential Revision: https://reviews.llvm.org/D54472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351701 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1932-128/+100
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix clang_Cursor_isAnonymousIvan Donchevskii2019-01-101-3/+7
| | | | | | | | Use the same logic as in TypePrinter::printTag to determine that the tag is anonymous and the separate check for namespaces. Differential Revision: https://reviews.llvm.org/D54996 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350805 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix the mismatched delete operator for ExprEvalResultAlex Lorenz2019-01-081-1/+1
| | | | | | | | | The '.stringVal' field in ExprEvalResult is allocated using new[], but was freed using a regular delete. That caused memory leaks in the test from r350666. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350680 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Recommit r336590 with a fix for the memory leak in the testAlex Lorenz2019-01-081-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | The original commit had a memory leak in the test has a leak as it doesn't dispose of the evaluated cursor result. This also contains the follow-up NFC refactoring commit r336591. rdar://45893054 Original commit message: [libclang] evalute compound statement cursors before trying to evaluate the cursor like a declaration This change fixes a bug in libclang in which it tries to evaluate a statement cursor as a declaration cursor, because that statement still has a pointer to the declaration parent. rdar://38888477 Differential Revision: https://reviews.llvm.org/D49051 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350666 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] CoroutineBody/Coreturn statements are UnexposedStmts and not ExprsAlex Lorenz2019-01-031-3/+6
| | | | | | | | | | | | | | This change ensures that the libclang CXCursor represents the CoroutineBody and the Coreturn statement using the appropriate CXCursor_UnexposedStmt kind instead of CXCursor_UnexposedExpr. The problem with CXCursor_UnexposedExpr is that the consumer functions assumed that CoroutineBody/Coreturn statements were valid expressions and performed an invalid downcast to Expr causing assertion failures or other crashes. rdar://40204290 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350282 91177308-0d34-0410-b5e6-96231b3b80d8
* [AST] Unify the code paths of traversing lambda expressions.Haojian Wu2018-12-181-17/+11
| | | | | | | | | | | | | | | | | | | | | | Summary: This supposes to be a non-functional change. We have two code paths when traversing lambda expressions: 1) traverse the function proto typeloc when parameters and return type are explicit; 2) otherwise fallback to traverse parameter decls and return type loc individually; This patch unifies the code path to always traverse parameters and return type, rather than relying on traversing the full type-loc. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55820 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349494 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add dependency on clangSerialization to unbreak ↵Fangrui Song2018-12-151-0/+1
| | | | | | | | -DBUILD_SHARED_LIBS=1 build after rC349237 Frontend headers have undefined reference on the symbol `clang::PCHContainerOperations::PCHContainerOperations()` through some shared_ptr usage. Any dependents will get the undefined reference which can only be resolved by explicit dependency on clangSerialization (due to -z defs). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349259 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix includes and dependencies for libclangRichard Trieu2018-12-155-6/+1
| | | | | | | | | Remove unneeded includes Add needed include Remove dependency on Serialization git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349237 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add generic AS to 'this' pointerMikael Nilsson2018-12-131-1/+1
| | | | | | | | | | | | | | Address spaces are cast into generic before invoking the constructor. Added support for a trailing Qualifiers object in FunctionProtoType. Note: This recommits the previously reverted patch, but now it is commited together with a fix for lldb. Differential Revision: https://reviews.llvm.org/D54862 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349019 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OpenCL] Add generic AS to 'this' pointer"Mikael Nilsson2018-12-121-1/+1
| | | | | | | | Reverting because the patch broke lldb. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348931 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add generic AS to 'this' pointerMikael Nilsson2018-12-121-1/+1
| | | | | | | | | | | Address spaces are cast into generic before invoking the constructor. Added support for a trailing Qualifiers object in FunctionProtoType. Differential Revision: https://reviews.llvm.org/D54862 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348927 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit dependency on clangSerialization for a bunch of components to ↵Fangrui Song2018-12-121-0/+1
| | | | | | | | | | | | | | | fix -DBUILD_SHARED_LIBS=on build This is a more thorough fix of rC348911. The story about -DBUILD_SHARED_LIBS=on build after rC348907 (Move PCHContainerOperations from Frontend to Serialization) is: 1. libclangSerialization.so defines PCHContainerReader dtor, ... 2. clangFrontend and clangTooling define classes inheriting from PCHContainerReader, thus their DSOs have undefined references on PCHContainerReader dtor 3. Components depending on either clangFrontend or clangTooling cannot be linked unless they have explicit dependency on clangSerialization due to the default linker option -z defs. The explicit dependency could be avoided if libclang{Frontend,Tooling}.so had these undefined references. This patch adds the explicit dependency on clangSerialization to make them build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348915 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Revert removal of tidy plugin support from libclang introduced in ↵Ivan Donchevskii2018-12-102-0/+22
| | | | | | | | r347496 Differential Revision: https://reviews.llvm.org/D55415 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348764 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix clang_Cursor_getNumArguments and clang_Cursor_getArgument for ↵Ivan Donchevskii2018-11-271-0/+10
| | | | | | | | | | | CXXConstructExpr Constructors have the same methods for arguments as call expressions. Let's provide a way to get their arguments the same way. Differential Revision: https://reviews.llvm.org/D54934 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347654 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add aarch64_vector_pcs function attribute to ClangSander de Smalen2018-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | This is the Clang patch to complement the following LLVM patches: https://reviews.llvm.org/D51477 https://reviews.llvm.org/D51479 More information describing the vector ABI and procedure call standard can be found here: https://developer.arm.com/products/software-development-tools/\ hpc/arm-compiler-for-hpc/vector-function-abi Patch by Kerry McLaughlin. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D54425 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347571 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the optional dependency from libclang to clang-tidy/include-fixerBenjamin Kramer2018-11-232-22/+0
| | | | | | | | clangd does a better job on both of these, so don't slow down everyone's build for a poorly working libclang feature. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347496 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Unify getCursorDecl and getCursorParentDeclFangrui Song2018-11-203-15/+10
| | | | | | They do the same thing, thus the latter (which has only 2 call sites) can be deleted. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@347293 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-082-0/+7
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346392 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r346326 [OpenCL] Add support of ↵Andrew Savonichev2018-11-072-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | cl_intel_device_side_avc_motion_estimation This patch breaks Index/opencl-types.cl LIT test: Script: -- : 'RUN: at line 1'; stage1/bin/c-index-test -test-print-type llvm/tools/clang/test/Index/opencl-types.cl -cl-std=CL2.0 | stage1/bin/FileCheck llvm/tools/clang/test/Index/opencl-types.cl -- Command Output (stderr): -- llvm/tools/clang/test/Index/opencl-types.cl:3:26: warning: unsupported OpenCL extension 'cl_khr_fp16' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:4:26: warning: unsupported OpenCL extension 'cl_khr_fp64' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:8:9: error: use of type 'double' requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:11:8: error: declaring variable of type 'half' is not allowed llvm/tools/clang/test/Index/opencl-types.cl:15:3: error: use of type 'double' requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:16:3: error: use of type 'double4' (vector of 4 'double' values) requires cl_khr_fp64 extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:26:26: warning: unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring [-Wignored-pragmas] llvm/tools/clang/test/Index/opencl-types.cl:35:44: error: use of type '__read_only image2d_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:36:49: error: use of type '__read_only image2d_array_msaa_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:37:49: error: use of type '__read_only image2d_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled llvm/tools/clang/test/Index/opencl-types.cl:38:54: error: use of type '__read_only image2d_array_msaa_depth_t' requires cl_khr_gl_msaa_sharing extension to be enabled git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346338 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extensionAndrew Savonichev2018-11-072-0/+7
| | | | | | | | | | | | | | | | | | Summary: Documentation can be found at https://www.khronos.org/registry/OpenCL/extensions/intel/cl_intel_device_side_avc_motion_estimation.txt Patch by Kristina Bessonova Reviewers: Anastasia, yaxunl, shafik Reviewed By: Anastasia Subscribers: arphaman, sidorovd, AlexeySotkin, krisb, bader, asavonic, cfe-commits Differential Revision: https://reviews.llvm.org/D51484 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346326 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 'atomic_default_mem_order' clause on 'requires' directive. ↵Patrick Lyster2018-11-021-0/+3
| | | | | | Also renamed test files relating to 'requires'. Differntial review: https://reviews.llvm.org/D53513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345967 91177308-0d34-0410-b5e6-96231b3b80d8
* Create ConstantExpr classBill Wendling2018-10-311-0/+4
| | | | | | | | | | | | | | | | | A ConstantExpr class represents a full expression that's in a context where a constant expression is required. This class reflects the path the evaluator took to reach the expression rather than the syntactic context in which the expression occurs. In the future, the class will be expanded to cache the result of the evaluated expression so that it's not needlessly re-evaluated Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D53475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345692 91177308-0d34-0410-b5e6-96231b3b80d8
* NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)Erik Pilkington2018-10-301-1/+1
| | | | | | | | | | We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC. Differential revision: https://reviews.llvm.org/D53547 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345637 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Introduce new completion context typesKadir Cetinkaya2018-10-241-2/+3
| | | | | | | | | | | | | | Summary: New name suggestions were being used in places where existing names should have been used, this patch tries to fix some of those situations. Reviewers: sammccall Reviewed By: sammccall Subscribers: arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53191 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345152 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for 'dynamic_allocators' clause on 'requires' directive. ↵Patrick Lyster2018-10-111-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D53079 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344249 91177308-0d34-0410-b5e6-96231b3b80d8
* Lift VFS from clang to llvm (NFC)Jonas Devlieghere2018-10-101-3/+3
| | | | | | | | | | | | | | | | | | | This patch moves the virtual file system form clang to llvm so it can be used by more projects. Concretely the patch: - Moves VirtualFileSystem.{h|cpp} from clang/Basic to llvm/Support. - Moves the corresponding unit test from clang to llvm. - Moves the vfs namespace from clang::vfs to llvm::vfs. - Formats the lines affected by this change, mostly this is the result of the added llvm namespace. RFC on the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2018-October/126657.html Differential revision: https://reviews.llvm.org/D52783 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344140 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Add reverse_offload clause to requires directivePatrick Lyster2018-10-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343711 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for unified_shared_memory clause on requires directivePatrick Lyster2018-10-011-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343472 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)Fangrui Song2018-09-261-3/+3
| | | | | | | | | | | | | | Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: rsmith, #clang, dblaikie Reviewed By: rsmith, #clang Subscribers: mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52576 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343147 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Add support for OMP5 requires directive + unified_address clauseKelvin Li2018-09-261-0/+4
| | | | | | | | | | Add support for OMP5.0 requires directive and unified_address clause. Patches to follow will include support for additional clauses. Differential Revision: https://reviews.llvm.org/D52359 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343063 91177308-0d34-0410-b5e6-96231b3b80d8
* [index] Enhance indexing for module referencesArgyrios Kyrtzidis2018-09-182-2/+4
| | | | | | | * Create a USR for the occurrences of the 'module' symbol kind * Record module references for each identifier in an import declaration git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342484 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Add completions for filenames in #include directives.Sam McCall2018-09-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The dir component ("somedir" in #include <somedir/fo...>) is considered fixed. We append "foo" to each directory on the include path, and then list its files. Completions are of the forms: #include <somedir/fo^ foo.h> fox/ The filter is set to the filename part ("fo"), so fuzzy matching can be applied to the filename only. No fancy scoring/priorities are set, and no information is added to CodeCompleteResult to make smart scoring possible. Could be in future. Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52076 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342449 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Return the proper pointee type for 'auto' deduced to pointerIvan Donchevskii2018-09-071-0/+7
| | | | | | | | Currently the resulting type is always invalid in such case. Differential Revision: https://reviews.llvm.org/D51281 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341656 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] Store MacroInfo in CodeCompletionResult for macro results.Eric Liu2018-09-051-9/+9
| | | | | | | | | | | | | | Summary: This provides information about the macro definition. For example, it can be used to compute macro USRs. Reviewers: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51675 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341476 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeComplete] Report location of opening parens for signature helpIlya Biryukov2018-08-301-1/+2
| | | | | | | | | | | | | | Summary: Used in clangd. Reviewers: sammccall Reviewed By: sammccall Subscribers: ioeric, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D51436 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341063 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix cursors for arguments of Subscript and Call operatorsIvan Donchevskii2018-08-231-1/+131
| | | | | | | | | | | | | | | | | | The DeclRefExpr of CXXOperatorCallExpr refering to the custom operator is visited before the arguments to the operator call. For the Call and Subscript operator the range of this DeclRefExpr includes the whole call expression, so that all tokens in that range were mapped to the operator function, even the tokens of the arguments. Fix this by ensuring that this particular DeclRefExpr is visited last. Fixes PR25775. Fix by Nikolai Kosjar. Differential Revision: https://reviews.llvm.org/D40481 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340521 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: add install/distribution targets for pythonSaleem Abdulrasool2018-08-201-0/+19
| | | | | | | | | | | Add installation support for the python bindings for libclang. Add an additional CMake configuration variable to enumerate the python versions for which the bindings should be installed. This allows for a LLVM/clang distribution to distribute the python bindings for libclang as part of the image. Because the python versions need to be explicitly stated by the user, the default image remains unchanged. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340228 91177308-0d34-0410-b5e6-96231b3b80d8
* Port getLocEnd -> getEndLocStephen Kelly2018-08-091-2/+2
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339386 91177308-0d34-0410-b5e6-96231b3b80d8
* Port getLocStart -> getBeginLocStephen Kelly2018-08-092-21/+21
| | | | | | | | | | Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339385 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang 8/8] Add support for the flag_enum attributeMichael Wu2018-08-032-0/+3
| | | | | | | | | | | | | | | | | Summary: This adds support to libclang for reading the flag_enum attribute. This also bumps CINDEX_VERSION_MINOR for this patch series. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49635 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338820 91177308-0d34-0410-b5e6-96231b3b80d8