summaryrefslogtreecommitdiffstats
path: root/clang/test/Index
Commit message (Collapse)AuthorAgeFilesLines
...
* [libclang] Support for querying the exception specification type through ↵Jonathan Coe2017-06-271-2/+15
| | | | | | | | | | | | | | | | | | | libclang Summary: This patch exposes the exception specification type (noexcept, etc.) of a C++ function through libclang and Python clang.cindex. Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: jbcoe, cfe-commits Differential Revision: https://reviews.llvm.org/D34091 Patch by Andrew Bennieston llvm-svn: 306483
* Recommit r306103: PR26195: Set correct NestedNameSpecifierLoc for theAlex Lorenz2017-06-271-0/+117
| | | | | | | | | | | | | | | | | | | | dependent initializer This commit fixes incorrect source positions of dependent c'tor initializers like in the following code: template<typename MyBase> struct Derived: MyBase::InnerIterator { Derived() : MyBase::InnerIterator() {} /// This line is problematic: all positions point to InnerIterator and nothing points to MyBase }; Patch by Serge Preis! Differential Revision: https://reviews.llvm.org/D32439 llvm-svn: 306392
* Revert r306103: "PR26195: Set correct NestedNameSpecifierLoc for theAlex Lorenz2017-06-231-117/+0
| | | | | | | | | dependent initializer" It caused buildbot failures such as this one: http://bb.pgr.jp/builders/test-clang-msc-x64-on-i686-linux-RA/builds/3777/steps/test_clang/logs/Clang%20%3A%3A%20Index__ctor-init-source-loc.cpp llvm-svn: 306111
* PR26195: Set correct NestedNameSpecifierLoc for the dependent initializerAlex Lorenz2017-06-231-0/+117
| | | | | | | | | | | | | | | | | | This commit fixes incorrect source positions of dependent c'tor initializers like in the following code: template<typename MyBase> struct Derived: MyBase::InnerIterator { Derived() : MyBase::InnerIterator() {} /// This line is problematic: all positions point to InnerIterator and nothing points to MyBase }; Patch by Serge Preis! Differential Revision: https://reviews.llvm.org/D32439 llvm-svn: 306103
* [index] Add the "SpecializationOf" relation to the forward declarationsAlex Lorenz2017-06-221-3/+7
| | | | | | | | | | | | | | of class template specializations This commit fixes an issue where a forward declaration of a class template specialization was not related to the base template. We need to relate even forward declarations because specializations don't have to be defined. rdar://32869409 Differential Revision: https://reviews.llvm.org/D34462 llvm-svn: 305996
* [preprocessor] Fix assertion hit when 'SingleFileParseMode' option is ↵Argyrios Kyrtzidis2017-06-211-0/+10
| | | | | | | | enabled and #if with an undefined identifier and without #else 'HandleEndifDirective' asserts that 'WasSkipping' is false, so switch to using 'FoundNonSkip' as the hint for 'SingleFileParseMode' to keep going with parsing. llvm-svn: 305940
* [index] Nested class declarations should be annotated with theAlex Lorenz2017-06-211-0/+17
| | | | | | | | | | | | | | | | | | | "specializationOf" relation if they pseudo-override a type in the base template This commit fixes an issue where Xcode's renaming engine couldn't find the reference to the second occurrence of "InnerClass" in this example: template<typename T> struct Ts { template<typename U> struct InnerClass { }; }; template<> struct Ts<int> { template<typename U> struct InnerClass; // This occurrence wasn't renamed }; rdar://31884960 Differential Revision: https://reviews.llvm.org/D34392 llvm-svn: 305911
* [preprocessor] When preprocessor option 'SingleFileParseMode' is enabled, ↵Argyrios Kyrtzidis2017-06-202-11/+111
| | | | | | | | | | parse all directive blocks if the condition uses undefined macros This is useful for being able to parse the preprocessor directive blocks even if the header, that defined the macro that is checked, hasn't been included. Differential Revision: https://reviews.llvm.org/D34263 llvm-svn: 305797
* [index] Record C++17 global binding declarationsAlex Lorenz2017-06-151-1/+27
| | | | | | | | The global C++17 binding declarations should be indexed as variable symbols. Differential Revision: https://reviews.llvm.org/D33920 llvm-svn: 305508
* [index] Index static_assert declarationsAlex Lorenz2017-06-151-0/+16
| | | | | | | | | | static_assert declarations have to be visited while indexing so that we can gather the references to declarations that are present in their assert expression. Differential Revision: https://reviews.llvm.org/D33913 llvm-svn: 305504
* Recommit r305117: [libclang] Merge multiple availability clauses whenAlex Lorenz2017-06-121-8/+10
| | | | | | | | | | getting the platform's availability Patch by Ronald Wampler! Differential Revision: https://reviews.llvm.org/D33478 llvm-svn: 305221
* Revert r305117Alex Lorenz2017-06-091-10/+8
| | | | | | It caused `Index/availability.c` test failure on Linux llvm-svn: 305122
* [libclang] Merge multiple availability clauses when getting the platform'sAlex Lorenz2017-06-091-8/+10
| | | | | | | | | | availability Patch by Ronald Wampler! Differential Revision: https://reviews.llvm.org/D33478 llvm-svn: 305117
* [libclang] Introduce a new parsing option ↵Argyrios Kyrtzidis2017-06-091-0/+11
| | | | | | | | 'CXTranslationUnit_SingleFileParse' that puts preprocessor in a mode for parsing a single file only. This is useful for parsing a single file, as a fast/inaccurate 'mode' that can still provide declarations from the file, like the classes and their methods. llvm-svn: 305044
* [OpenCL] Fix pipe size in TypeInfo.Anastasia Stulova2017-06-051-0/+16
| | | | | | | | | | | Pipes are now the size of pointers rather than the size of the type that they contain. Patch by Simon Perretta! Differential Revision: https://reviews.llvm.org/D33597 llvm-svn: 304708
* [coroutines] Support "coroutines" feature in module map requires clauseEric Fiselier2017-05-281-0/+1
| | | | | | | | | | | | | | Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33538 llvm-svn: 304107
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-242-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is recommit of r302775, reverted in r302777 due to a fail in clang-tidy. Original mesage is below. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 303756
* [index] The references to explicit class properties should be recordedAlex Lorenz2017-05-241-0/+9
| | | | | | rdar://32376363 llvm-svn: 303751
* [index] The references to enum constants from member enums that areAlex Lorenz2017-05-231-0/+3
| | | | | | | | | from template instantiations should refer to the enum constant in the pattern enum in the base template rdar://32325459 llvm-svn: 303651
* [index] The references to member enums from template instantiations shouldAlex Lorenz2017-05-231-0/+8
| | | | | | | | refer to the pattern member enum in the base template rdar://32325459 llvm-svn: 303650
* [index] The references to type aliases and typedefs from templateAlex Lorenz2017-05-231-0/+10
| | | | | | | | | instantiations should refer to the pattern type aliases / typedefs in the base templates rdar://32325459 llvm-svn: 303648
* [index] The references to fields from nested records in template instantiationsAlex Lorenz2017-05-231-0/+7
| | | | | | | | should refer to the pattern fields in the nested records in the base templates rdar://32352429 llvm-svn: 303647
* [index] The references to records from template instantiations should referAlex Lorenz2017-05-231-0/+21
| | | | | | | | to the pattern records in the base templates rdar://32325459 llvm-svn: 303646
* [libclang] [OpenCL] Expose more OpenCL CIndex typesSven van Haastregt2017-05-231-1/+103
| | | | | | | | | | | | | | Expose pipe, sampler_t, clk_event_t, queue_t, reserve_id_t, and all image types. Update the opencl-types.cl test RUN line such that we can test the OpenCL 2.0 types. Patch by Simon Perretta. Differential Revision: https://reviews.llvm.org/D33197 llvm-svn: 303626
* [index] Index the default template parameter valuesAlex Lorenz2017-05-221-0/+59
| | | | | | rdar://32323724 llvm-svn: 303568
* [index] Index the deleted functionsAlex Lorenz2017-05-221-0/+8
| | | | | | rdar://32323386 llvm-svn: 303563
* [index] Visit the default argument values in function definitionsAlex Lorenz2017-05-221-1/+17
| | | | | | rdar://32323315 llvm-svn: 303559
* [index] 'using namespace' declarations in functions should recordAlex Lorenz2017-05-221-0/+11
| | | | | | | | the reference to the namespace rdar://32323190 llvm-svn: 303555
* [index] Fix forward declarations interfering with USR generation of external ↵Argyrios Kyrtzidis2017-05-201-0/+4
| | | | | | | | | source symbols Patch by Nathan Hawes. https://reviews.llvm.org/D33346 llvm-svn: 303484
* [index] Avoid one more crash caused by infinite recursion that happens whenAlex Lorenz2017-05-181-0/+17
| | | | | | | | | | looking up a dependent name in a record that derives from itself rdar://32273000 Differential Revision: https://reviews.llvm.org/D33324 llvm-svn: 303366
* [index] Record references to class receivers used in property referencesAlex Lorenz2017-05-181-0/+19
| | | | | | rdar://32250025 llvm-svn: 303343
* [index] Avoid another crash that happens when looking up a dependent nameAlex Lorenz2017-05-161-0/+10
| | | | | | | | in a record that has a base without a definition rdar://32224197 llvm-svn: 303192
* [index] References to fields from template instantiations should refer toAlex Lorenz2017-05-151-0/+39
| | | | | | | | fields in base templates rdar://32197158 llvm-svn: 303068
* [index] Visit and store information about namespace alias declarationsAlex Lorenz2017-05-151-0/+7
| | | | | | rdar://32195226 llvm-svn: 303048
* [index] Store correct location for namespace nested name qualifiersAlex Lorenz2017-05-151-0/+18
| | | | | | rdar://32195200 llvm-svn: 303046
* [index] Avoid a crash that happens when looking up a dependent nameAlex Lorenz2017-05-151-0/+9
| | | | | | | | in a record that has no definition rdar://32194921 llvm-svn: 303045
* [index] Index template specialization arguments for function templatsAlex Lorenz2017-05-121-0/+27
| | | | | | | | Also ensure that class template specialization arguments are covered rdar://31812032 llvm-svn: 302918
* Reverted r302775Serge Pavlov2017-05-112-12/+12
| | | | llvm-svn: 302777
* Driver must return non-zero code on errors in command lineSerge Pavlov2017-05-112-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test set. File test/Driver/gfortran.f90 added in r118203 checks forwarding gfortran flags to GCC. Now driver reports error on this file, because the option -working-directory implemented in clang differs from the option with the same name implemented in gfortran, in clang the option requires argument, in gfortran does not. In the file test/Driver/arm-darwin-builtin.c clang is called with options -fbuiltin-strcat and -fbuiltin-strcpy. These option were removed in r191435 and now clang reports error on this test. File arm-default-build-attributes.s uses option -verify, which is not supported by driver, it is cc1 option. Similarly, the file split-debug.h uses options -fmodules-embed-all-files and -fmodule-format=obj, which are not supported by driver. Other revealed errors are mainly mistypes. Differential Revision: https://reviews.llvm.org/D33013 llvm-svn: 302775
* [libclang] Introduce clang_Cursor_isExternalSymbol that provides info about ↵Argyrios Kyrtzidis2017-05-101-0/+11
| | | | | | decls marked with external_source_symbol attribute llvm-svn: 302677
* [index] Index simple dependent declaration referencesAlex Lorenz2017-05-101-0/+124
| | | | | | | | | | | | This commit implements basic support for indexing of dependent declaration references. Now the indexer tries to find a suitable match in the base template for a dependent member ref/decl ref/dependent type. rdar://29158210 Differential Revision: https://reviews.llvm.org/D32972 llvm-svn: 302632
* [CodeCompletion] Complete platform names in @available expressionsAlex Lorenz2017-05-091-0/+20
| | | | | | rdar://32074504 llvm-svn: 302545
* DiagnosticsEngine should clear DelayedDiagID before reporting theAlex Lorenz2017-05-041-0/+29
| | | | | | | | | | | | | | | | | | | | | delayed diagnostic This fix avoids an infinite recursion that was uncovered in one of our internal tests by r301992. The testcase is the most reduced version of that auto-generated test. This is an improved version of the reverted commit r302037. The previous fix actually managed to expose another subtle bug whereby `fatal_too_many_errors` error was reported twice, with the second report setting the `FatalErrorOccurred` flag. That prevented the notes that followed the diagnostic the caused `fatal_too_many_errors` to be emitted. This commit ensures that notes that follow `fatal_too_many_errors` but that belong to the diagnostic that caused `fatal_too_many_errors` won't be emitted by setting the `FatalErrorOccurred` when emitting `fatal_too_many_errors`. rdar://31962618 llvm-svn: 302151
* [Index] The relation between the declarations in templateAlex Lorenz2017-05-041-27/+26
| | | | | | | | | | specializations that 'override' declarations in the base template should use the 'specializationOf' relation instead of 'specializationOf | overrideOf'. The indexer relations are meant to be orthogonal, so 'specializationOf' is better than the combined relation. llvm-svn: 302136
* Revert r302037Alex Lorenz2017-05-031-29/+0
| | | | | | | | | The commit caused the following two buildbot failures: Clang :: Misc/error-limit-multiple-notes.cpp Clang :: Misc/error-limit.c llvm-svn: 302046
* DiagnosticsEngine should clear DelayedDiagID before reporting theAlex Lorenz2017-05-031-0/+29
| | | | | | | | | | | | delayed diagnostic This avoids an infinite loop that was uncovered in one of our internal tests by r301992. The testcase is the most reduced version of that auto-generated test. rdar://31962618 llvm-svn: 302037
* [modules] Round-trip -Werror flag through explicit module build.Richard Smith2017-05-031-2/+2
| | | | | | | | | | | | | | | The intent for an explicit module build is that the diagnostics produced within the module are those that were configured when the module was built, not those that are enabled within a user of the module. This includes diagnostics that don't actually show up until the module is used (for instance, diagnostics produced during template instantiation and weird cases like -Wpadded). We serialized and restored the diagnostic state for individual warning groups, but previously did not track the state for flags like -Werror and -Weverything, which are implemented as separate bits rather than as part of the diagnostics mapping information. llvm-svn: 301992
* Remove leftover test expectation from rL301902.Emilio Cobos Alvarez2017-05-021-1/+0
| | | | llvm-svn: 301906
* [libclang] Revert rL301328 and add tests for the regressions introduced.Emilio Cobos Alvarez2017-05-021-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D32566 llvm-svn: 301902
* [libclang] Expose some target information via the C API.Emilio Cobos Alvarez2017-04-281-0/+6
| | | | | | | | | | | This allows users to query the target triple and target pointer width, which would make me able to fix https://github.com/servo/rust-bindgen/issues/593 and other related bugs in an elegant way (without having to manually parse the target triple in the command line arguments). Differential Revision: https://reviews.llvm.org/D32389 llvm-svn: 301648
OpenPOWER on IntegriCloud