summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Reduce the number of implicit StringRef->std::string conversions by ↵Benjamin Kramer2016-02-131-3/+2
| | | | | | | | threading StringRef through more APIs. No functionality change intended. llvm-svn: 260815
* [index] Change some default parameters to fix an MSVC ICE.Argyrios Kyrtzidis2016-02-131-3/+3
| | | | | | Many thanks to Yunzhong Gao for tracking this down! llvm-svn: 260807
* [RecursiveASTVisitor] Introduce dataTraverseStmtPre()/dataTraverseStmtPost() ↵Argyrios Kyrtzidis2016-02-131-3/+7
| | | | | | | | to allow clients to do before/after actions during data recursive visitation. This should fix the asan bot that hits stack overflow in a couple of test/Index tests. llvm-svn: 260785
* [libclang] Separate the underlying indexing functionality of libclang and ↵Argyrios Kyrtzidis2016-02-128-0/+1759
| | | | | | | | introduce it into the clangIndex library. It is a general goodness for libclang itself to mostly be a wrapper of functionality provided by the libraries. llvm-svn: 260760
* Fix remaining Clang-tidy readability-redundant-control-flow warnings; other ↵Eugene Zelenko2016-02-121-5/+8
| | | | | | | | minor fixes. Differential revision: http://reviews.llvm.org/D17218 llvm-svn: 260757
* Remove autoconf supportChris Bieneman2016-01-261-13/+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 llvm-svn: 258862
* Roll-back r250822.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | Summary: It breaks the build for the ASTMatchers Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D13893 llvm-svn: 250827
* Apply modernize-use-default to clang.Angel Garcia Gomez2015-10-201-1/+1
| | | | | | | | | | | | Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: bkramer, klimek Subscribers: klimek, alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13890 llvm-svn: 250822
* [VFS] Port SimpleFormatContext to InMemoryFileSystem.Benjamin Kramer2015-10-061-6/+6
| | | | llvm-svn: 249389
* Replace double negation of !FileID.isInvalid() with FileID.isValid().Yaron Keren2015-10-031-1/+1
| | | | | | +couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228. llvm-svn: 249235
* [OpenCL] Add new types for OpenCL 2.0.Alexey Bader2015-09-151-0/+10
| | | | | | | | Patch by Pedro Ferreira. Reviewers: pekka.jaaskelainen Differential Revision: http://reviews.llvm.org/D12855 llvm-svn: 247676
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-132-6/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* Rename MacroDefinition -> MacroDefinitionRecord, ↵Richard Smith2015-05-041-1/+1
| | | | | | | | | | Preprocessor::MacroDefinition -> MacroDefinition. clang::MacroDefinition now models the currently-defined value of a macro. The previous MacroDefinition type, which represented a record of a macro definition directive for a detailed preprocessing record, is now called MacroDefinitionRecord. llvm-svn: 236400
* Remove empty non-virtual destructors or mark them =default when non-publicBenjamin Kramer2015-04-111-2/+0
| | | | | | These add no value but can make a class non-trivially copyable. NFC. llvm-svn: 234689
* [libclang] Use same USR encoding for 'char' regardless of what the target ↵Argyrios Kyrtzidis2014-12-081-1/+1
| | | | | | | | considers the sign to be. Should fix the clang-hexagon-elf bot. llvm-svn: 223642
* [libclang] Encode InjectedClassNameType in the USR.Argyrios Kyrtzidis2014-12-081-0/+4
| | | | llvm-svn: 223634
* [libclang] Encode location info for anonymous embedded tag decls.Argyrios Kyrtzidis2014-12-081-1/+5
| | | | | | Otherwise the USR will conflict with different embedded tag decls. llvm-svn: 223633
* [libclang] Use same USR encoding for 'class' as 'struct'.Argyrios Kyrtzidis2014-12-081-3/+3
| | | | | | | | 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. llvm-svn: 223632
* [libclang] Encode C++11 rvalue reference types in the USR.Argyrios Kyrtzidis2014-12-081-0/+5
| | | | llvm-svn: 223631
* [libclang] Encode the C++11 method reference qualifier in the USR.Argyrios Kyrtzidis2014-12-081-0/+5
| | | | llvm-svn: 223630
OpenPOWER on IntegriCloud