summaryrefslogtreecommitdiffstats
path: root/lib/Tooling/Refactoring
Commit message (Collapse)AuthorAgeFilesLines
* [LibTooling] Change Transformer's TextGenerator to a partial function.Yitzhak Mandelbaum2019-04-301-19/+21
| | | | | | | | | | | | | | | | | | | | | | Summary: Changes the signature of the TextGenerator std::function to return an Expected<std::string> instead of std::string to allow for (non-fatal) failures. Previously, we expected that any failures would be expressed with assertions. However, that's unfriendly to running the code in servers or other places that don't want their library calls to crash the program. Correspondingly, updates Transformer's handling of failures in TextGenerators and the signature of `ChangeConsumer`. Reviewers: ilya-biryukov Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61015 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359574 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Fix unneeded use of unique_ptr where shared_ptr is expected.Yitzhak Mandelbaum2019-04-291-4/+5
| | | | | | | | | | | | | | Summary: This fixes a few places in the Stencil implementation where a unique_ptr is created at a callsite that expects shared_ptr. Since the former implicitly converts to the latter, the code compiles and runs correctly as is. But, there's no reason to involve unique_ptr -- the current code was leftover from a previous version in which unique_ptr was the expected type. Reviewers: sbenza Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61005 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359468 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Fix build breakage from commit 7b7ce6683ee.Yitzhak Mandelbaum2019-04-181-1/+2
| | | | | | | | On configurations with -Werror,-Wmissing-field-initializers, the commit does not compile. This commit fixes the offending line. Original Differential Revision: https://reviews.llvm.org/D60408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358705 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Extend Transformer to support multiple simultaneous changes.Yitzhak Mandelbaum2019-04-181-39/+57
| | | | | | | | | | | | | | | | Summary: This revision allows users to specify independent changes to multiple (related) sections of the input. Previously, only a single section of input could be selected for replacement. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60408 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358697 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Add Stencil library for format-string style codegen.Yitzhak Mandelbaum2019-04-182-0/+200
| | | | | | | | | | | | | | | | | | | | | Summary: This file defines the *Stencil* abstraction: a code-generating object, parameterized by named references to (bound) AST nodes. Given a match result, a stencil can be evaluated to a string of source code. A stencil is similar in spirit to a format string: it is composed of a series of raw text strings, references to nodes (the parameters) and helper code-generation operations. See thread on cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling" for background. Reviewers: sbenza Reviewed By: sbenza Subscribers: ilya-biryukov, mgorny, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59371 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358691 91177308-0d34-0410-b5e6-96231b3b80d8
* [Lookup] Invisible decls should not be ambiguous when renaming.Eric Liu2019-04-151-2/+2
| | | | | | | | | | | | | | | | | | Summary: For example, a renamed type in a header file can conflict with declaration in a random file that includes the header, but we should not consider the decl ambiguous if it's not visible at the rename location. This improves consistency of generated replacements when header file is included in different TUs. Reviewers: hokein Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60257 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358378 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Add Transformer, a library for source-to-source transformations.Yitzhak Mandelbaum2019-04-052-0/+204
| | | | | | | | | | | | | | | | Summary: Adds a basic version of Transformer, a library supporting the concise specification of clang-based source-to-source transformations. A full discussion of the end goal can be found on the cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling". Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, ABataev, mgorny, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59376 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357768 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Add "SourceCode" library for functions relating to source-code ↵Yitzhak Mandelbaum2019-04-052-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | manipulation. Summary: Introduces a utility library in Refactoring/ to collect routines related to source-code manipulation. In this change, we move "extended-range" functions from the FixIt library (in clangTooling) to this new library. We need to use this functionality in Refactoring/ and cannot access it if it resides in Tooling/, because that would cause clangToolingRefactor to depend on clangTooling, which would be a circular dependency. Reviewers: ilya-biryukov, ioeric Reviewed By: ilya-biryukov Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60269 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357764 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[LibTooling] Add Transformer, a library for source-to-source ↵Alexey Bataev2019-04-032-205/+0
| | | | | | | | | transformations." This reverts commit r357576 to fix the problem with the cyclic dependencies between libTooling and libToolingRefactor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357612 91177308-0d34-0410-b5e6-96231b3b80d8
* [LibTooling] Add Transformer, a library for source-to-source transformations.Yitzhak Mandelbaum2019-04-032-0/+205
| | | | | | | | | | | | | | | | Summary: Adds a basic version of Transformer, a library supporting the concise specification of clang-based source-to-source transformations. A full discussion of the end goal can be found on the cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling". Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: mgorny, jfb, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59376 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357576 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1912-48/+36
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
* PR40096: Forwards-compatible with C++20 rule regarding aggregates not having ↵David Blaikie2018-12-191-2/+0
| | | | | | | | | | user-declared ctors Looks like these were in place to make these types move-only. That's generally not a feature that the type should prescribe (unless it's an inherent limitation) - instead leaving it up to the users of a type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349669 91177308-0d34-0410-b5e6-96231b3b80d8
* Port getLocEnd -> getEndLocStephen Kelly2018-08-093-4/+4
| | | | | | | | | | Reviewers: teemperor! Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50351 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339386 91177308-0d34-0410-b5e6-96231b3b80d8
* Port getLocStart -> getBeginLocStephen Kelly2018-08-093-6/+6
| | | | | | | | | | Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339385 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-096-12/+12
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in clangAlexander Kornienko2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329399 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][selection] canonicalize decl ref callee to the call exprAlex Lorenz2017-11-141-13/+48
| | | | | | | | We would like to extract the full call when just the callee function is selected git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318215 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][selection] canonicalize member expr callee to the fullAlex Lorenz2017-11-141-1/+12
| | | | | | | | | member call expression We would like to extract the full call when just the callee is selected. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318205 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][extract] avoid extracting expressions from types in functionsAlex Lorenz2017-11-141-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318169 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-refactor] Get rid of OccurrencesFinder in RenamingAction, NFCHaojian Wu2017-11-081-18/+9
| | | | | | | | | | | | | | | | | | Summary: The OccurrencesFinder is only used in RenameOccurrences to find symbol occurrences, there is no need to inherit RefactoringRule. Replace it with a single utility function to avoid code misleading. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D39796 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317696 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-refactor] Introduce a new rename rule for qualified symbolsHaojian Wu2017-11-082-0/+76
| | | | | | | | | | | | | | Summary: Prototype of a new rename rule for renaming qualified symbol. Reviewers: arphaman, ioeric, sammccall Reviewed By: arphaman, sammccall Subscribers: jklaehn, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39332 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317672 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Extract.cpp that wasn't moved in r317343Alex Lorenz2017-11-031-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317344 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][extract] insert semicolons into extracted/inserted codeAlex Lorenz2017-11-034-4/+173
| | | | | | | | | | | | | | | | | | | when needed This commit implements the semicolon insertion logic into the extract refactoring. The following rules are used: - extracting expression: add terminating ';' to the extracted function. - extracting statements that don't require terminating ';' (e.g. switch): add terminating ';' to the callee. - extracting statements with ';': move (if possible) the original ';' from the callee and add terminating ';'. - otherwise, add ';' to both places. Differential Revision: https://reviews.llvm.org/D39441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317343 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][selection] canonicalize selected string literal to objcAlex Lorenz2017-11-021-1/+22
| | | | | | | string literal when possible git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317224 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][extract] code extracted from inline method should be placedAlex Lorenz2017-11-011-2/+7
| | | | | | | in a function defined before the outer class git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317062 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][extract] prohibit extraction of ObjC property settersAlex Lorenz2017-11-011-5/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317056 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor][selection] code ranges can be selected in objc methodsAlex Lorenz2017-11-011-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317054 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] select the entire DeclStmt if one ifs decls is selectedAlex Lorenz2017-10-311-5/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316971 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] Fix a clang-tidy warning.Haojian Wu2017-10-301-1/+2
| | | | | | NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316895 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] Describe refactorings in the operation classesAlex Lorenz2017-10-273-146/+126
| | | | | | | | | | | | | | | | | | This commit changes the way that the refactoring operation classes are structured: - Users have to call `initiate` instead of constructing an instance of the class. The `initiate` is now supposed to have custom initiation logic, and you don't need to subclass the builtin requirements. - A new `describe` function returns a structure with the id, title and the description of the refactoring operation. The refactoring action classes are now placed into one common place in RefactoringActions.cpp instead of being separate. Differential Revision: https://reviews.llvm.org/D38985 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316780 91177308-0d34-0410-b5e6-96231b3b80d8
* [rename] support renaming class member.Haojian Wu2017-10-251-0/+49
| | | | | | | | | | | | Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39178 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316571 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-rename] Fix and enable the failing TemplatedClassFunction test.Haojian Wu2017-10-251-0/+20
| | | | | | | | | | | | Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D39241 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316561 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing clangRewrite lib dependency for clangToolingRefactorAlex Lorenz2017-10-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316467 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] Initial outline of implementation of "extract function" refactoringAlex Lorenz2017-10-244-0/+319
| | | | | | | | | | | | | | | | | | | | This commit adds an initial, skeleton outline of the "extract function" refactoring. The extracted function doesn't capture variables / rewrite code yet, it just basically does a simple copy-paste. The following initiation rules are specified: - extraction can only be done for executable code in a function/method/block. This means that you can't extract a global variable initialize into a function right now. - simple literals and references are not extractable. This commit also adds support for full source ranges to clang-refactor's test mode. Differential Revision: https://reviews.llvm.org/D38982 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316465 91177308-0d34-0410-b5e6-96231b3b80d8
* [rename] Don't overwrite the template argument when renaming a template ↵Haojian Wu2017-10-231-1/+6
| | | | | | | | | | | | | | function. Reviewers: ioeric Reviewed By: ioeric Subscribers: cierpuchaw, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D39120 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316314 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few nits in RenamingAction.Haojian Wu2017-10-191-2/+2
| | | | | | | * Add missing override keyword. * avoid unnecessary copy of std::string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316152 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] selection: new CodeRangeASTSelection represents a set of selectedAlex Lorenz2017-10-181-0/+105
| | | | | | | | | | | | consecutive statements This commit adds a CodeRangeASTSelection value to the refactoring library. This value represents a set of selected statements in one body of code. Differential Revision: https://reviews.llvm.org/D38835 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316104 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-rename] Rename alias.Haojian Wu2017-10-181-60/+59
| | | | | | | | | | | | | | | | | | Summary: * Support rename alias. * Add unittests for renaming alias. * Don't generate fixes for the SourceLocations that are invalid or in temporary buffer, otherwise crash would be happened when generating AtomicChanges. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D39043 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316074 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-rename] Rename enum.Haojian Wu2017-10-171-4/+40
| | | | | | | | | | | | | | | | Summary: * Add unit tests for renaming enum. * Support unscoped enum constants in expressions. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D38989 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315999 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] allow the use of refactoring diagnosticsAlex Lorenz2017-10-161-5/+4
| | | | | | | | | | This commit allows the refactoring library to use its own set of refactoring-specific diagnostics to reports things like initiation errors. Differential Revision: https://reviews.llvm.org/D38772 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315924 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-rename] Add function unit tests.Haojian Wu2017-10-161-0/+23
| | | | | | | | | | | | | | | | | Summary: Also contain a fix: * Fix a false positive of renaming a using shadow function declaration. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D38882 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315898 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit r315087 "[refactor] add support for refactoring options"Alex Lorenz2017-10-131-11/+13
| | | | | | | | | | | | | | | | | The recommit fixes a UB bug that occurred only on a small number of bots. Original message: This commit adds initial support for refactoring options. One can now use optional and required std::string options. This commit also adds a NewNameOption for the local-rename refactoring action to allow rename to work with custom names. Differential Revision: https://reviews.llvm.org/D37856 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315661 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang-rename] Don't add prefix qualifiers to the declaration and definition ↵Haojian Wu2017-10-111-26/+49
| | | | | | | | | | | | | | of the renamed symbol. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits, arphaman Differential Revision: https://reviews.llvm.org/D38723 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315452 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r315087Alex Lorenz2017-10-061-13/+11
| | | | | | | clang-refactor crashes on some bots after this commit git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315095 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] add support for refactoring optionsAlex Lorenz2017-10-061-11/+13
| | | | | | | | | | | | | This commit adds initial support for refactoring options. One can now use optional and required std::string options. This commit also adds a NewNameOption for the local-rename refactoring action to allow rename to work with custom names. Differential Revision: https://reviews.llvm.org/D37856 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315087 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] Simplify the refactoring interfaceAlex Lorenz2017-10-023-57/+57
| | | | | | | | | | | | | | This commit simplifies the interface for the refactoring action rules and the refactoring requirements. It merges the selection constraints and the selection requirements into one class. The refactoring actions rules must now be implemented using subclassing instead of raw function / lambda pointers. This change also removes a bunch of template-based traits and other template definitions that are now redundant. Differential Revision: https://reviews.llvm.org/D37681 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314704 91177308-0d34-0410-b5e6-96231b3b80d8
* [refactor] add clang-refactor tool with initial testing support andAlex Lorenz2017-09-145-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* clang-rename: let -force handle multiple renamesMiklos Vajna2017-09-112-2/+10
| | | | | | | | | | | | | | | | | | | | | | | 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
* Recommit r312127: [refactor] AST selection tree should contain syntacticAlex Lorenz2017-08-301-0/+22
| | | | | | | | | | | | | | | | | form of PseudoObjectExpr The new commit adjusts unittest test code compilation options so that the Objective-C code in the unittest can be parsed on non-macOS platforms. Original message: The AST selection finder now constructs a selection tree that contains only the syntactic form of PseudoObjectExpr. This form of selection tree is more meaningful when doing downstream analysis as we're interested in the syntactic features of the AST and the correct lexical parent relation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312132 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r312127 as the ObjC unittest code fails to compile on LinuxAlex Lorenz2017-08-301-22/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312131 91177308-0d34-0410-b5e6-96231b3b80d8