- Sep 27, 2017
-
-
Sean Callanan authored
ExternalASTMerger has hitherto relied on being able to look up any Decl through its named DeclContext chain. This works for many cases, but causes problems for function-local structs, which cannot be looked up in their containing FunctionDecl. An example case is void f() { { struct S { int a; }; } { struct S { bool b; }; } } It is not possible to lookup either of the two Ses individually (or even to provide enough information to disambiguate) after parsing is over; and there is typically no need to, since they are invisible to the outside world. However, ExternalASTMerger needs to be able to complete either S on demand. This led to an XFAIL on test/Import/local-struct, which this patch removes. The way the patch works is: It defines a new data structure, ExternalASTMerger::OriginMap, which clients are expected to maintain (default-constructing if the origin does not have an ExternalASTMerger servicing it) As DeclContexts are imported, if they cannot be looked up by name they are placed in the OriginMap. This allows ExternalASTMerger to complete them later if necessary. As DeclContexts are imported from an origin that already has its own OriginMap, the origins are forwarded – but only for those DeclContexts that are actually used. This keeps the amount of stored data minimal. The patch also applies several improvements from review: - Thoroughly documents the interface to ExternalASTMerger; - Adds optional logging to help track what's going on; and - Cleans up a bunch of braces and dangling elses. Differential Revision: https://reviews.llvm.org/D38208 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314336 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 22, 2017
-
-
Hans Wennborg authored
clang-format.exe removes trailing new lines at end of file. However, if no NL is found at EOF one should be added. Patch by Teodor MICU! Differential Revision: https://reviews.llvm.org/D37732 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314033 91177308-0d34-0410-b5e6-96231b3b80d8
-
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
-
Gabor Horvath authored
This patch introduces a class that can help to build tools that require cross translation unit facilities. This class allows function definitions to be loaded from external AST files based on an index. In order to use this functionality an index is required. The index format is a flat text file but it might be replaced with a different solution in the near future. USRs are used as names to look up the functions definitions. This class also does caching to avoid redundant loading of AST files. Right now only function defnitions can be loaded using this API because this is what the in progress cross translation unit feature of the Static Analyzer requires. In to future this might be extended to classes, types etc. Differential Revision: https://reviews.llvm.org/D34512 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313975 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 20, 2017
-
-
Serge Pavlov authored
When clang is called as 'target-clang', put deduced target option at the start of argument list so that option '--target=' specified in command line could override it. This change fixes PR34671. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313760 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 14, 2017
-
-
Alex Lorenz authored
This commit ensures that CommonOptionsParser works with subcommands. This allows clang-refactor to use the CommonOptionsParser. Differential Revision: https://reviews.llvm.org/D37618 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313260 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
This is an attempt to fix http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage after r313244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313252 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
This is an attempt to fix http://bb.pgr.jp/builders/clang-i686-linux-RA/ after r313244. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313249 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alex Lorenz authored
local-rename action This commit introduces the clang-refactor tool alongside the local-rename action which uses the existing renaming engine used by clang-rename. The tool doesn't actually perform the source transformations yet, it just provides testing support. This commit also moves only one test from clang-rename over to test/Refactor. I will continue to move the other tests throughout development of clang-refactor. The following options are supported by clang-refactor: -v: use verbose output -selection: The source range that corresponds to the portion of the source that's selected (currently only special command test:<file> is supported). Please note that a follow-up commit will migrate clang-refactor to libTooling's common option parser, so clang-refactor will be able to use the common interface with compilation database and options like -p, -extra-arg, etc. The testing support provided by clang-refactor is described below: When -selection=test:<file> is given, clang-refactor will parse the selection commands from that file. The selection commands are grouped and the specified refactoring action invoked by the tool. Each command in a group is expected to produce an identical result. The precise syntax for the selection commands is described in a comment in TestSupport.h. Differential Revision: https://reviews.llvm.org/D36574 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313244 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 13, 2017
-
-
Saleem Abdulrasool authored
Introduce the 'TLS Kind' property of variable declarations through libclang. Additionally, provide a Python accessor for it, and test that functionality. Patch by Masud Rahman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313111 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 12, 2017
-
-
Hans Wennborg authored
We're moving the extension to a new account on the VS Marketplace, and apparently it's not possible to re-upload an extension with an existing ID on a new account. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313060 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 11, 2017
-
-
Vedant Kumar authored
This patch teaches the preprocessor to report more precise source ranges for code that is skipped due to conditional directives. The new behavior includes the '#' from the opening directive and the full text of the line containing the closing directive in the skipped area. This matches up clang's behavior (we don't IRGen the code between the closing "endif" and the end of a line). This also affects the code coverage implementation. See llvm.org/PR34166 (this also happens to be rdar://problem/23224058). The old behavior (report the end of the skipped range as the end location of the 'endif' token) is preserved for indexing clients. Differential Revision: https://reviews.llvm.org/D36642 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312947 91177308-0d34-0410-b5e6-96231b3b80d8
-
Miklos Vajna authored
Summary: The use case is that renaming multiple symbols in a large enough codebase is much faster if all of these can be done with a single invocation, but there will be multiple translation units where one or more symbols are not found. Old behavior was to exit with an error (default) or exit without reporting an error (-force). New behavior is that -force results in a best-effort rename: rename symbols which are found and just ignore the rest. The existing help for -force sort of already implies this behavior. Reviewers: cfe-commits, klimek, arphaman Reviewed By: klimek Differential Revision: https://reviews.llvm.org/D37634 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312942 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 08, 2017
-
-
Sjoerd Meijer authored
This is a recommit of r312781; in some build configurations variable names are omitted, so changed the new regression test accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312794 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sjoerd Meijer authored
The clang-with-lto-ubuntu bot didn't like the new regression test, revert while I investigate the issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312784 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sjoerd Meijer authored
This adds _Float16 as a source language type, which is a 16-bit floating point type defined in C11 extension ISO/IEC TS 18661-3. In follow up patches documentation and more tests will be added. Differential Revision: https://reviews.llvm.org/D33719 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312781 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312766 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 05, 2017
-
-
Jonas Devlieghere authored
This patch changes the default behavior of `diagtool tree` to only display warning flags and not the internal warnings flags. The latter is an implementation detail of the compiler and usually not what the users wants. Furthermore, flags that are enabled by default are now also printed in green. Originally, this was only the case for the diagnostic names. Differential revision: https://reviews.llvm.org/D37390 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312546 91177308-0d34-0410-b5e6-96231b3b80d8
-
Jonas Devlieghere authored
Precommit for https://reviews.llvm.org/D37390 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312545 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312536 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 29, 2017
-
-
Erik Verbruggen authored
Looks like this one was forgotten for clang_parseTranslationUnit*, as LIBCLANG_NOTHREADS is checked for/in: clang_saveTranslationUnit() clang_reparseTranslationUnit() clang_codeCompleteAt() clang_indexTranslationUnit() clang_indexSourceFile() Patch by Nikolai Kosjar! Differential Revision: https://reviews.llvm.org/D36821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311990 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
Information about clang executable name components, such as target and driver mode, was passes in std::pair. With this change it is passed in a special structure. It improves readability and makes access to this information more convenient. NFC. Differential Revision: https://reviews.llvm.org/D36057 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311981 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 24, 2017
-
-
George Karpenkov authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311621 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 23, 2017
-
-
Matt Morehouse authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311592 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37072 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311575 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Summary: This adds shortcuts j and k to jump between changes. It is especially useful in diffs with few changes. Reviewers: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36685 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311570 91177308-0d34-0410-b5e6-96231b3b80d8
-
George Karpenkov authored
Differential Revision: https://reviews.llvm.org/D37043 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311516 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 22, 2017
-
-
Jacob Gravelle authored
Summary: Rename stop-after to stop-diff-after. When building LLVM with -DLLVM_BUILD_LLVM_DYLIB=ON, stop-after collides with the stop-after already present in LLVM. Reviewers: johannes, arphaman Subscribers: klimek, aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D36989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311476 91177308-0d34-0410-b5e6-96231b3b80d8
-
Krasimir Georgiev authored
Summary: This patch fixes a regression after https://reviews.llvm.org/rL305665, which updates the structure of the `lines` variable. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D37011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311456 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 21, 2017
-
-
Matt Morehouse authored
Add instructions on how to modify the compiler invocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311345 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 20, 2017
-
-
Johannes Altmanninger authored
Summary: Use qualified names if available. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36186 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311292 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Summary: Add separate tests for the top-down and the bottom-up phase, as well as one for the optimal matching. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36185 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311284 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 19, 2017
-
-
Johannes Altmanninger authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311249 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Reviewers: arphaman Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D36182 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311241 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311240 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36181 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311237 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Summary: This is done with -ast-dump; the JSON variant has been renamed to -ast-dump-json. Reviewers: arphaman Differential Revision: https://reviews.llvm.org/D36180 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311232 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
Fix build by renaming ChangeKind -> Change This reverts commit 0c78c572. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311222 91177308-0d34-0410-b5e6-96231b3b80d8
-
Johannes Altmanninger authored
This reverts commit eac4c13a, the original commit *should* not have caused the build failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311216 91177308-0d34-0410-b5e6-96231b3b80d8
-
Vlad Tsyrklevich authored
This reverts commit r311199, it was causing widespread build failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311211 91177308-0d34-0410-b5e6-96231b3b80d8
-