summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* [index] Rename SymbolSubKind -> SymbolProperty, NFC.Argyrios Kyrtzidis2016-11-111-50/+50
| | | | | | This better reflects what it represents. llvm-svn: 286680
* [index] Add SymbolSubKind for the GKInspectable annotation.Argyrios Kyrtzidis2016-11-101-0/+6
| | | | llvm-svn: 286518
* Remove FormatContext from libClang as it is now unused.Daniel Jasper2016-11-081-24/+5
| | | | llvm-svn: 286279
* Revert "Remove now unnecessary FormatRewriterContext."Daniel Jasper2016-11-081-0/+2
| | | | | | | This reverts commit r286262. I accidentally committed it without all of the changes. llvm-svn: 286264
* Remove now unnecessary FormatRewriterContext.Daniel Jasper2016-11-081-2/+0
| | | | llvm-svn: 286262
* [clang-format] Remove (SourceManager, FileID) variantsDaniel Jasper2016-11-081-13/+13
| | | | | | | | | | | | | In Format, remove the reformat() and clean() functions taking a SourceManager and a FileID. Keep the versions taking StringRef Code. - there was duplicated functionality - the FileID versions were harder to use - the clean() version is dead code anyways Patch by Krasimir Georgiev. Thank you. llvm-svn: 286243
* [index] Handle properly C++14's template variables.Argyrios Kyrtzidis2016-11-073-14/+45
| | | | | | | | | - Infer the right symbol kind. - Provide a templated USR, similar to how we handle class templates. rdar://28980398 llvm-svn: 286154
* [index] Make sure to mark class template symbols as having 'generic' sub-kind.Argyrios Kyrtzidis2016-11-071-2/+7
| | | | llvm-svn: 286153
* [index] Fix assertion hit when handling a declaration of C++'s 'operator ↵Argyrios Kyrtzidis2016-11-022-13/+8
| | | | | | | | | | | new' function. Part of this is to allow creating a USR for the canonical decl of that which is implicit and does not have a source location. rdar://28978992 llvm-svn: 285868
* [index] Avoid using a RecursiveASTVisitor for SyntacticFormIndexer and ↵Argyrios Kyrtzidis2016-11-011-43/+14
| | | | | | | | iterate the DesignatedInitExprs of the InitListExpr directly. This is more efficient, as per feedback by Richard. llvm-svn: 285666
* [index] Fix repeated visitation of the same InitListExpr for indexing.Argyrios Kyrtzidis2016-10-311-0/+17
| | | | | | | | It was visited multiple times unnecessarily. rdar://28985038 llvm-svn: 285647
* [index] Fixes for locations and relations in Objective C categories and ↵Argyrios Kyrtzidis2016-10-252-9/+41
| | | | | | | | | | | getters/setters - Add entries for protocols on categories - Add relation between categories and class they extend - Add relation between getters/setters and their corresponding property - Use category name location as the location of category decls/defs if it has one llvm-svn: 285120
* Visit lambda capture inits from RecursiveASTVisitor::TraverseLambdaCapture().Martin Bohme2016-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: rL277342 made RecursiveASTVisitor visit lambda capture initialization expressions (these are the Exprs in LambdaExpr::capture_inits()). jdennett identified two issues with rL277342 (see comments there for details): - It visits initialization expressions for implicit lambda captures, even if shouldVisitImplicitCode() returns false. - It visits initialization expressions for init captures twice (because these were already traveresed in TraverseLambdaCapture() before rL277342) This patch fixes these issues and moves the code for traversing initialization expressions into TraverseLambdaCapture(). This patch also makes two changes required for the tests: - It adds Lang_CXX14 to the Language enum in TestVisitor. - It adds a parameter to ExpectedLocationVisitor::ExpectMatch() that specifies the number of times a match is expected to be seen. Reviewers: klimek, jdennett, alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23204 llvm-svn: 278933
* [index] Fix crash with indexing designated init expressions inside templates.Argyrios Kyrtzidis2016-08-031-1/+1
| | | | | | rdar://27452869 llvm-svn: 277570
* [NFC] Header cleanupMehdi Amini2016-07-181-1/+0
| | | | | | | | | | 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
* [index] Create different USR if a property is a class property.Argyrios Kyrtzidis2016-07-151-5/+6
| | | | | | Avoids USR conflicts between class & instance properties of the same name. llvm-svn: 275630
* [index] Index system ImportDecls even when there is a DeclarationsOnly filterBen Langmuir2016-07-141-2/+2
| | | | | | | | | | | | Whether we call an ImportDecl a decl or a reference symbol role is somewhat academic, but in practice it's more like a declaration because it is interesting even to consumers who wouldn't care about references. Most importantly, we want to report the module dependencies of system modules even when we have declaration-only filtering. rdar://problem/27134855 llvm-svn: 275454
* Use more ArrayRefsDavid Majnemer2016-06-242-3/+3
| | | | | | No functional change is intended, just a small refactoring. llvm-svn: 273647
* Use ranges to concisely express iterationDavid Majnemer2016-06-231-12/+7
| | | | | | | No functional change is intended, this should just clean things up a little. llvm-svn: 273522
* 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
* [index] Add SymbolSubKinds for ObjC IB annotations.Argyrios Kyrtzidis2016-04-221-0/+17
| | | | llvm-svn: 267118
* [index] Add a SymbolSubKind for an ObjC unit test.Argyrios Kyrtzidis2016-04-221-1/+35
| | | | llvm-svn: 267117
* [index] Change SymbolCXXTemplateKind to a 'SymbolSubKinds' bitset.Argyrios Kyrtzidis2016-04-221-19/+41
| | | | | | This provides a more general and flexible way to annotate special symbols. llvm-svn: 267116
* Revert 266186 as it breaks anything that includes type_traits on some platformsNemanja Ivanovic2016-04-151-2/+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). llvm-svn: 266460
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-131-0/+2
| | | | | | | | | | | | | | | | 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. llvm-svn: 266186
* [OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.Alexey Bader2016-04-131-1/+1
| | | | | | | | | | Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header". This fixes the modules build. Differential revision: http://reviews.llvm.org/D18954 Reviewers: Richard Smith, Vassil Vassilev. llvm-svn: 266180
* [OpenCL] Complete image types support.Alexey Bader2016-04-081-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I. Current implementation of images is not conformant to spec in the following points: 1. It makes no distinction with respect to access qualifiers and therefore allows to use images with different access type interchangeably. The following code would compile just fine: void write_image(write_only image2d_t img); kernel void foo(read_only image2d_t img) { write_image(img); } // Accepted code which is disallowed according to s6.13.14. 2. It discards access qualifier on generated code, which leads to generated code for the above example: call void @write_image(%opencl.image2d_t* %img); In OpenCL2.0 however we can have different calls into write_image with read_only and wite_only images. Also generally following compiler steps have no easy way to take different path depending on the image access: linking to the right implementation of image types, performing IR opts and backend codegen differently. 3. Image types are language keywords and can't be redeclared s6.1.9, which can happen currently as they are just typedef names. 4. Default access qualifier read_only is to be added if not provided explicitly. II. This patch corrects the above points as follows: 1. All images are encapsulated into a separate .def file that is inserted in different points where image handling is required. This avoid a lot of code repetition as all images are handled the same way in the code with no distinction of their exact type. 2. The Cartesian product of image types and image access qualifiers is added to the builtin types. This simplifies a lot handling of access type mismatch as no operations are allowed by default on distinct Builtin types. Also spec intended access qualifier as special type qualifier that are combined with an image type to form a distinct type (see statement above - images can't be created w/o access qualifiers). 3. Improves testing of images in Clang. Author: Anastasia Stulova Reviewers: bader, mgrang. Subscribers: pxli168, pekka.jaaskelainen, yaxunl. Differential Revision: http://reviews.llvm.org/D17821 llvm-svn: 265783
* [index] Fix regression where ObjC method declarations may mistakenly get ↵Argyrios Kyrtzidis2016-03-311-3/+3
| | | | | | | | indexed as definition. rdar://25372906 llvm-svn: 265042
* [index] Remove redundancy between symbol kind and languageBen Langmuir2016-03-251-45/+44
| | | | | | | | | Condense the ObjCKIND and CXXKIND options into just KIND, since the language was already specified on a per-symbol basis and this information was redundant. This only changes the internal representation; naturally the libclang interface remains the same. llvm-svn: 264423
* [index] Make sure that declarations of builtin functions are indexed.Argyrios Kyrtzidis2016-03-171-2/+5
| | | | | | rdar://25154630 llvm-svn: 263689
* Pacify gcc's parenthesis warning, which doesn't realize that parens don't ↵Manuel Klimek2016-03-091-3/+2
| | | | | | matter here. llvm-svn: 263004
* [index] Add a message for the assertion, NFC.Argyrios Kyrtzidis2016-03-091-1/+2
| | | | llvm-svn: 262991
* [index] libclang: Make sure to treat forward ObjC protocols as ↵Argyrios Kyrtzidis2016-03-091-4/+4
| | | | | | | | ObjCProtocolRef declarations, and fix related crash. rdar://25035376 llvm-svn: 262985
* [index] Fix assertion hit when indexing re-declarations of built-in functions.Argyrios Kyrtzidis2016-03-091-0/+1
| | | | llvm-svn: 262984
* Make TargetInfo store an actual DataLayout instead of a string.James Y Knight2016-03-041-3/+1
| | | | | | | | | | | | | | Use it to calculate UserLabelPrefix, instead of specifying it (often incorrectly). Note that the *actual* user label prefix has always come from the DataLayout, and is handled within LLVM. The main thing clang's TargetInfo::UserLabelPrefix did was to set the #define value. Having these be different from each-other is just silly. Differential Revision: http://reviews.llvm.org/D17183 llvm-svn: 262737
* [index] Distinguish USRs of anonymous enums by using their first enumerator.Argyrios Kyrtzidis2016-03-042-6/+11
| | | | | | rdar://24609949. llvm-svn: 262695
* [index] Include parameter types in the USRs for C functions marked with ↵Argyrios Kyrtzidis2016-03-041-1/+2
| | | | | | 'overloadable' attribute. llvm-svn: 262694
* [index] In ObjC++ handle objc type parameters for function USRs.Argyrios Kyrtzidis2016-03-041-0/+17
| | | | llvm-svn: 262693
* [index] Ignore ObjCTypeParamDecls during indexing.Argyrios Kyrtzidis2016-03-041-0/+3
| | | | llvm-svn: 262686
* [index] Report references of ObjC super class/protocols in interfaces and ↵Argyrios Kyrtzidis2016-03-031-6/+31
| | | | | | protocols. llvm-svn: 262584
* [index] Fix issue where data visitation was disabled with C++ operator call ↵Argyrios Kyrtzidis2016-03-011-2/+2
| | | | | | expressions, during indexing. llvm-svn: 262290
* [index] Print and test module import references.Argyrios Kyrtzidis2016-02-292-2/+10
| | | | llvm-svn: 262208
* [index] Add a caller relation for a call reference.Argyrios Kyrtzidis2016-02-292-16/+31
| | | | llvm-svn: 262207
* [index] Use ',' to separate symbol roles when printing.Argyrios Kyrtzidis2016-02-291-1/+1
| | | | llvm-svn: 262205
* clangIndex requires LLVMIR as Core, since r260858 uses llvm/IR.NAKAMURA Takumi2016-02-151-0/+1
| | | | llvm-svn: 260874
* [AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in ↵Argyrios Kyrtzidis2016-02-152-1/+25
| | | | | | | | | | printing policy. Enable it for USRs and names when indexing. Forward references can have different template argument names; including them makes USRs and names unstable, since the name depends on whether we saw a forward reference or not. llvm-svn: 260866
* silence -Wreturn-type warningsSaleem Abdulrasool2016-02-152-0/+4
| | | | | | | | These codepaths would generate warnings with GCC on linux even though the switch was covered. Add llvm_unreachable markers to indicate that the switch should be covered. NFC. llvm-svn: 260865
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-143-1/+201
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* [index] Enhance c-index-test tool and have it link and test the clangIndex ↵Argyrios Kyrtzidis2016-02-141-0/+99
| | | | | | library directly. llvm-svn: 260842
* [index] Allow calling createIndexingAction() without passing another action ↵Argyrios Kyrtzidis2016-02-141-22/+56
| | | | | | to wrap over. llvm-svn: 260841
OpenPOWER on IntegriCloud