summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[OpenCL] Add generic AS to 'this' pointer"Mikael Nilsson2018-12-121-1/+1
| | | | | | Reverting because the patch broke lldb. llvm-svn: 348931
* [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 llvm-svn: 348927
* 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. llvm-svn: 348915
* [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 llvm-svn: 348764
* [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 llvm-svn: 347654
* [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 llvm-svn: 347571
* 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. llvm-svn: 347496
* [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. llvm-svn: 347293
* [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 llvm-svn: 346392
* 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 llvm-svn: 346338
* [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 llvm-svn: 346326
* 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 llvm-svn: 345967
* 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 llvm-svn: 345692
* 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 llvm-svn: 345637
* [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 llvm-svn: 345152
* Add support for 'dynamic_allocators' clause on 'requires' directive. ↵Patrick Lyster2018-10-111-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D53079 llvm-svn: 344249
* 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 llvm-svn: 344140
* [OPENMP] Add reverse_offload clause to requires directivePatrick Lyster2018-10-031-0/+3
| | | | llvm-svn: 343711
* Add support for unified_shared_memory clause on requires directivePatrick Lyster2018-10-011-0/+3
| | | | llvm-svn: 343472
* 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 llvm-svn: 343147
* [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 llvm-svn: 343063
* [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 llvm-svn: 342484
* [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 llvm-svn: 342449
* [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 llvm-svn: 341656
* [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 llvm-svn: 341476
* [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 llvm-svn: 341063
* [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 llvm-svn: 340521
* 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. llvm-svn: 340228
* Port getLocEnd -> getEndLocStephen Kelly2018-08-091-2/+2
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 llvm-svn: 339386
* Port getLocStart -> getBeginLocStephen Kelly2018-08-092-21/+21
| | | | | | | | | | Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 llvm-svn: 339385
* [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 llvm-svn: 338820
* [libclang 7/8] Add support for getting property setter and getter namesMichael Wu2018-08-032-0/+26
| | | | | | | | | | | | | | Summary: This allows libclang to access the actual names of property setters and getters without needing to go through the indexer API. Usually default names are used, but the property can specify a different name. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49634 llvm-svn: 338816
* [libclang 6/8] Add support for reading implicit attributesMichael Wu2018-08-031-1/+3
| | | | | | | | | | | | | | | | | Summary: Having access to implicit attributes is sometimes useful so users of libclang don't have to duplicate some of the logic in sema. This depends on D49081 since it also adds a CXTranslationUnit flag. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49631 llvm-svn: 338815
* [libclang 5/8] Add support for ObjC attributes without argsMichael Wu2018-08-032-0/+51
| | | | | | | | | | | | | | | | | Summary: This adds support to libclang for identifying ObjC related attributes that don't take arguments. All attributes but NSObject and NSConsumed are tested. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49127 llvm-svn: 338813
* [libclang 4/8] Add the clang_Type_getNullability() APIMichael Wu2018-08-032-0/+20
| | | | | | | | | | | | | | | | | Summary: This patch adds a clang-c API for querying the nullability of an AttributedType. The test here also tests D49081 Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49082 llvm-svn: 338809
* [libclang 3/8] Add support for AttributedTypeMichael Wu2018-08-032-1/+17
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support to the libclang API for identifying AttributedTypes in CXTypes and reading the modified type that the type points to. Currently AttributedTypes are skipped. This patch continues to skip AttributedTypes by default, but adds a parsing option to CXTranslationUnit to include AttributedTypes. This patch depends on D49066 since it also adds a CXType. Testing will be added in another patch which depends on this one. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49081 llvm-svn: 338808
* [libclang 2/8] Add support for ObjCTypeParamMichael Wu2018-08-031-0/+2
| | | | | | | | | | | | | | | | | Summary: This patch adds support to the libclang API for identifying ObjCTypeParams in CXTypes. This patch depends on D49063 since both patches add new values to CXTypeKind. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49066 llvm-svn: 338807
* [libclang 1/8] Add support for ObjCObjectTypeMichael Wu2018-08-032-0/+75
| | | | | | | | | | | | | | Summary: This patch adds support to the clang-c API for identifying ObjCObjects in CXTypes, enumerating type args and protocols on ObjCObjectTypes, and retrieving the base type of ObjCObjectTypes. Currently only ObjCInterfaceTypes are exposed, which do not have type args or protocols. Reviewers: yvvan, jbcoe Reviewed By: yvvan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49063 llvm-svn: 338804
* [Index] Set OrigD before D is changed.Eric Liu2018-07-201-0/+2
| | | | | | | | | | | | Reviewers: akyrtzi, arphaman Reviewed By: akyrtzi Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49476 llvm-svn: 337529
* PR15730/PR16986 Allow dependently typed vector_size types.Erich Keane2018-07-131-0/+1
| | | | | | | | | | | | | | | | | As listed in the above PRs, vector_size doesn't allow dependent types/values. This patch introduces a new DependentVectorType to handle a VectorType that has a dependent size or type. In the future, ALL the vector-types should be able to create one of these to handle dependent types/sizes as well. For example, DependentSizedExtVectorType could likely be switched to just use this instead, though that is left as an exercise for the future. Differential Revision: https://reviews.llvm.org/D49045 llvm-svn: 337036
* Revert -r336726, which included more files than intended.Erich Keane2018-07-101-1/+0
| | | | llvm-svn: 336727
* [NFC] Switch CodeGenFunction to use value init instead of member init listsErich Keane2018-07-101-0/+1
| | | | | | | | The member init list for the sole constructor for CodeGenFunction has gotten out of hand, so this patch moves the non-parameter-dependent initializations into the member value inits. llvm-svn: 336726
* Revert r336590 "[libclang] evalute compound statement cursors before trying ↵Evgeniy Stepanov2018-07-101-13/+13
| | | | | | | | | to evaluate" New memory leaks in LibclangParseTest_EvaluateChildExpression_Test::TestBody() llvm-svn: 336716
* Revert r336591 "[libclang] NFC, simplify clang_Cursor_Evaluate"Evgeniy Stepanov2018-07-101-24/+25
| | | | | | This change is blocking r336590 which is being reverted due to memory leaks. llvm-svn: 336715
* [libclang] NFC, simplify clang_Cursor_EvaluateAlex Lorenz2018-07-091-25/+24
| | | | | | | Take advantage of early returns as suggested by Duncan in https://reviews.llvm.org/D49051 llvm-svn: 336591
* [libclang] evalute compound statement cursors before trying to evaluateAlex Lorenz2018-07-091-13/+13
| | | | | | | | | | | | | | 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 llvm-svn: 336590
* Factor out Clang's desired 8MB stack size constant from the variousRichard Smith2018-07-031-2/+3
| | | | | | places we hardcode it. llvm-svn: 336231
* [liblang] Remove DOS line endings in libclang.exportsRainer Orth2018-06-211-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Undefined first referenced symbol in file clang_getCompletionFixIt /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTokenLocation /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getToken /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTemplateCursorKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTUResourceUsageName /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionChunkKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionChunkText /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getSpellingLocation /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionParent /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionChunkCompletionString /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionPriority /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionNumFixIts /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTokenExtent /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getCompletionNumAnnotations /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports clang_getTokenKind /var/gcc/llvm/obj/local/tools/clang/tools/libclang/libclang.exports ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status make[2]: *** [tools/clang/tools/libclang/CMakeFiles/libclang.dir/build.make:651: lib/libclang.so.7] Error 1 It turns out that this is caused by https://reviews.llvm.org/D46862: it added a couple of CRs (^M) to some lines. Solaris ld takes them to be part of the symbol names, which of course are missing from the input objects. GNU ld handles this just fine. Fixed by removing the CRs. Bootstrapped on i386-pc-solaris2.11. I guess this is obvious. Differential Revision: https://reviews.llvm.org/D48423 llvm-svn: 335234
* [Fixed Point Arithmetic] Fixed Point Precision Bits and Fixed Point LiteralsLeonard Chan2018-06-202-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This diff includes the logic for setting the precision bits for each primary fixed point type in the target info and logic for initializing a fixed point literal. Fixed point literals are declared using the suffixes ``` hr: short _Fract uhr: unsigned short _Fract r: _Fract ur: unsigned _Fract lr: long _Fract ulr: unsigned long _Fract hk: short _Accum uhk: unsigned short _Accum k: _Accum uk: unsigned _Accum ``` Errors are also thrown for illegal literal values ``` unsigned short _Accum u_short_accum = 256.0uhk; // expected-error{{the integral part of this literal is too large for this unsigned _Accum type}} ``` Differential Revision: https://reviews.llvm.org/D46915 llvm-svn: 335148
* [libclang] Optionally add code completion results for arrow instead of dotIvan Donchevskii2018-06-133-16/+104
| | | | | | | | Follow up for D41537 - libclang part. Differential Revision: https://reviews.llvm.org/D46862 llvm-svn: 334593
OpenPOWER on IntegriCloud