- Jan 03, 2018
-
-
Hans Wennborg authored
This broke test/Index/opencl-types.cl on several buildbots: http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/3294 http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/6498 http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/5239 > [libclang] Support querying whether a declaration is invalid > > This is useful for e.g. highlighting purposes in an IDE. > > Patch by Nikolai Kosjar. > > Differential Revision: https://reviews.llvm.org/D40072 Also reverting follow-ups that otherwise caused conflicts for the revert: r321700 "Fix line endings." r321701 "Fix more line endings." r321698 "[libclang] Fix cursors for functions with trailing return type" > For the function declaration > > auto foo5(Foo) -> Foo; > the parameter tokens were mapped to cursors representing the > FunctionDecl: > > Keyword: "auto" [1:1 - 1:5] FunctionDecl=test5:1:6 > Identifier: "test5" [1:6 - 1:11] FunctionDecl=test5:1:6 > Punctuation: "(" [1:11 - 1:12] FunctionDecl=test5:1:6 > Identifier: "X" [1:12 - 1:13] FunctionDecl=test5:1:6 // Ops, not a TypeRef > Punctuation: ")" [1:13 - 1:14] FunctionDecl=test5:1:6 > Punctuation: "->" [1:15 - 1:17] FunctionDecl=test5:1:6 > Identifier: "X" [1:18 - 1:19] TypeRef=struct X:7:8 > Punctuation: ";" [1:19 - 1:20] > > Fix this by ensuring that the trailing return type is not visited as > first. > > Patch by Nikolai Kosjar. > > Differential Revision: https://reviews.llvm.org/D40561 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321708 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ivan Donchevskii authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321700 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ivan Donchevskii authored
This is useful for e.g. highlighting purposes in an IDE. Patch by Nikolai Kosjar. Differential Revision: https://reviews.llvm.org/D40072 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321697 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 14, 2017
-
-
Alex Lorenz authored
This patch allows checking whether a C++ record declaration is abstract through libclang and clang.cindex (Python). Patch by Johann Klähn! Differential Revision: https://reviews.llvm.org/D36952 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320748 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 07, 2017
-
-
Alex Lorenz authored
requested by client This is a follow up to r319702 which records parsing invocations. These files are not emitted by default, and the client has to specify the invocation emission path first. rdar://35322543 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320085 91177308-0d34-0410-b5e6-96231b3b80d8
-
Shoaib Meenai authored
Another follow-up to r319840. I'd done a test configure with LLVM_BUILD_STATIC, so I'm not sure why this didn't show up in that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319983 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 05, 2017
-
-
Shoaib Meenai authored
We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319840 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 04, 2017
-
-
Alex Lorenz authored
by client This patch extends libclang by allowing it to record parsing operations to a temporary JSON file. The file is deleted after parsing succeeds. When a crash happens during parsing, the file is preserved and the client will be able to use it to generate a reproducer for the crash. These files are not emitted by default, and the client has to specify the invocation emission path first. rdar://35322543 Differential Revision: https://reviews.llvm.org/D40527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319702 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 30, 2017
-
-
Shoaib Meenai authored
Use this function to create the install targets rather than doing so manually, which gains us the `-stripped` install targets to perform stripped installations. Differential Revision: https://reviews.llvm.org/D40675 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319489 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 22, 2017
-
-
Dave Lee authored
Summary: ObjC classes have two associated symbols, one for the class and one for the metaclass. This change overloads `CodegenNameGenerator::getAllManglings` to produce both class and metaclass symbols. While this function is called by `clang_Cursor_getCXXManglings`, it's only called for CXXRecordDecl and CXXMethodDecl, and so libclang's behavior is unchanged. Reviewers: arphaman, abdulras, alexshap, compnerd Reviewed By: compnerd Subscribers: compnerd Differential Revision: https://reviews.llvm.org/D37671 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313997 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 12, 2017
-
-
Alex Lorenz authored
This commit allows checking whether an enum declaration is scoped through libclang and clang.cindex (Python). Patch by Johann Klähn! Differential Revision: https://reviews.llvm.org/D35187 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307771 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307770 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
This commit allows checking whether an enum declaration is scoped through libclang and clang.cindex (Python). Differential Revision: https://reviews.llvm.org/D35187 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307769 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 30, 2017
-
-
Richard Smith authored
We use this when running a preprocessor-only action on an AST file in order to avoid paying the runtime cost of loading the extra information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306760 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 28, 2017
-
-
Jonathan Coe authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306483 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 09, 2017
-
-
Argyrios Kyrtzidis authored
[libclang] Introduce a new parsing option '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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305044 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 30, 2017
-
-
Erik Verbruggen authored
A suspended translation unit uses significantly less memory but on the other side does not support any other calls than clang_reparseTranslationUnit to resume it or clang_disposeTranslationUnit to dispose it completely. This helps IDEs to reduce the memory footprint. The data that is freed by a call to clang_suspendTranslationUnit will be re-generated on the next (re)parse anyway. Used with a preamble, this allows pretty fast resumption of the translation unit for further use (compared to disposal of the translation unit and a parse from scratch). Patch by Nikolai Kosjar! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304212 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 10, 2017
-
-
Argyrios Kyrtzidis authored
[libclang] Introduce clang_Cursor_isExternalSymbol that provides info about decls marked with external_source_symbol attribute git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302677 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 28, 2017
-
-
Emilio Cobos Alvarez authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301648 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 27, 2017
-
-
Argyrios Kyrtzidis authored
[libclang] Enhance clang_Cursor_isDynamicCall and clang_Cursor_getReceiverType to handle ObjC property references Also enhance clang_Cursor_getReceiverType to handle C++ method calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301568 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 24, 2017
-
-
Argyrios Kyrtzidis authored
[index] If the 'external_source_symbol' attribute indicates 'Swift' as the language then report it accordingly git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301183 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 21, 2017
-
-
Argyrios Kyrtzidis authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298441 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
In such a case, as when using the NS_ENUM macro, for indexing purposes treat the typedef as 'transparent', meaning we treat its references as symbols of the underlying tag symbol. Also provide a libclang API to check for such typedefs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298392 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 26, 2017
-
-
Argyrios Kyrtzidis authored
[index] Add 'Parameter' symbol kind and 'Local' symbol property to distinguish function-local symbols Parameters have a 'child' relation to their function/method. Also add an option '-include-locals' to 'c-index-test core' to enable indexing of function-local symbols. Original patch from Nathan Hawes with some changes by me. https://reviews.llvm.org/D30304 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296282 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 23, 2017
-
-
Argyrios Kyrtzidis authored
It's unnecessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295934 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Feb 15, 2017
-
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295245 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 30, 2017
-
-
Argyrios Kyrtzidis authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293466 91177308-0d34-0410-b5e6-96231b3b80d8
-
Argyrios Kyrtzidis authored
This ensures the capability to index a module file using an existing ASTReader from a compiler instance or ASTUnit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293461 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 29, 2017
-
-
Argyrios Kyrtzidis authored
[c-index-test] Provide capability for 'c-index-test core' to dump symbol information from a PCH/module file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293416 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 09, 2017
-
-
Argyrios Kyrtzidis authored
Initially reports if a constructor symbol is a copy or move constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291409 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 06, 2017
-
-
David Blaikie authored
Aleksey Shlypanikov pointed out my mistake in migrating an explicit unique_ptr to auto - I was expecting the function returned a unique_ptr, but instead it returned a raw pointer - introducing a leak. Thanks Aleksey! This reapplies r291184, reverted in r291249. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291270 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
Caused a memory leak reported by asan. Reverting while I investigate. This reverts commit r291184. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291249 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 05, 2017
-
-
David Blaikie authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291184 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 16, 2016
-
-
Argyrios Kyrtzidis authored
[libclang] Restore the CXXRecordDecl path for clang_Type_getNumTemplateArguments and clang_Type_getTemplateArgumentAsType Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26907 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289995 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 02, 2016
-
-
Argyrios Kyrtzidis authored
Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26788 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288438 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 12, 2016
-
-
Argyrios Kyrtzidis authored
This better reflects what it represents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286680 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 08, 2016
-
-
Mehdi Amini authored
The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283671 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jul 30, 2016
-
-
Argyrios Kyrtzidis authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277261 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 09, 2016
-
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272233 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 01, 2016
-
-
Manman Ren authored
rdar://25963227 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271351 91177308-0d34-0410-b5e6-96231b3b80d8
-