- Aug 24, 2017
-
-
Alex Lorenz authored
This should fix http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental_build/41578/ llvm-svn: 311656
-
Alex Lorenz authored
This commit adds the base AST source selection component to the refactoring library. AST selection is represented using a tree of SelectedASTNode values. Each selected node gets its own selection kind, which can actually be None even in the middle of tree (e.g. statement in a macro whose child is in a macro argument). The initial version constructs a "raw" selection tree, without applying filters and canonicalisation operations to the nodes. Differential Revision: https://reviews.llvm.org/D35012 llvm-svn: 311655
-
- Aug 22, 2017
-
-
Johannes Altmanninger authored
Handle the case when DeclContext is null. llvm-svn: 311434
-
Johannes Altmanninger authored
Summary: If a node referring to a name is within a class or namespace, do not use the full qualified name, but strip the namespace prefix. Reviewers: arphaman, bkramer Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36681 llvm-svn: 311433
-
- Aug 20, 2017
-
-
Johannes Altmanninger authored
Summary: Use qualified names if available. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36186 llvm-svn: 311292
-
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 llvm-svn: 311284
-
Johannes Altmanninger authored
Summary: Ignore macros and implicit AST nodes, as well as anything outside of the main source file. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36184 llvm-svn: 311280
-
- Aug 19, 2017
-
-
Johannes Altmanninger authored
Summary: Until we find a decent heuristic on how to choose between multiple identical trees, there is no point in supporting multiple mappings. This also enables matching of nodes with parents of different types, because there are many instances where this is appropriate. For example for and foreach statements; functions in the global or other namespaces. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36183 llvm-svn: 311251
-
Johannes Altmanninger authored
Fix build by renaming ChangeKind -> Change This reverts commit 0c78c5729f29315d7945988efd048c0cb86c07ce. llvm-svn: 311222
-
Johannes Altmanninger authored
This reverts commit eac4c13ac9ea8f12bc049e040c7b9c8a517f54e7, the original commit *should* not have caused the build failure. llvm-svn: 311216
-
Vlad Tsyrklevich authored
This reverts commit r311199, it was causing widespread build failures. llvm-svn: 311211
-
Vlad Tsyrklevich authored
This reverts commit r311200, it was causing widespread build failures. llvm-svn: 311210
-
- Aug 18, 2017
-
-
Johannes Altmanninger authored
Summary: This also changes the output order of the changes. Now the matches are printed in pre-order, intertwined with insertions, updates, and moves. Deletions are printed afterwards. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36179 llvm-svn: 311200
-
Johannes Altmanninger authored
Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36178 llvm-svn: 311199
-
Johannes Altmanninger authored
Fix to the computation of the rightmost descendant. Prevents root nodes from being mapped if they are already mapped. This only makes a difference when we compare AST Nodes other than entire translation units, a feature which still has to be tested. Reviewers: arphaman Subscribers: klimek Differential Revision: https://reviews.llvm.org/D36176 llvm-svn: 311172
-
Johannes Altmanninger authored
This is useful for tools such as clang-diff which do not use CommonOptionsParser due to the need for multiple compilation databases. llvm-svn: 311170
-
- Aug 15, 2017
-
-
Stephen Hines authored
Summary: If assertions are disabled, but LLVM_ABI_BREAKING_CHANGES is enabled, this will cause an issue with an unchecked Success. Switching to consumeError() is the correct way to bypass the check. Reviewers: llvm-commits, cfe-commits, arphaman Reviewed By: arphaman Subscribers: arphaman, klimek, pirama Differential Revision: https://reviews.llvm.org/D36728 llvm-svn: 310958
-
Alexander Shaposhnikov authored
1. Add missing explicit for SymbolName constructor. 2. Add missing std::move in createRenameReplacements. Differential revision: https://reviews.llvm.org/D36715 llvm-svn: 310948
-
- Aug 14, 2017
-
-
Alex Lorenz authored
Symbol occurrences store the results of local rename and will also be used for the global, indexed rename results. Their kind is used to determine whether they should be renamed automatically or not. They can be converted to a set of AtomicChanges as well. Differential Revision: https://reviews.llvm.org/D36156 llvm-svn: 310853
-
- Aug 02, 2017
-
-
Alex Lorenz authored
This function will be used by the clang-refactor's rename actions llvm-svn: 309813
-
- Aug 01, 2017
-
-
Johannes Altmanninger authored
llvm-svn: 309738
-
Johannes Altmanninger authored
llvm-svn: 309737
-
- Jul 31, 2017
-
-
Eric Liu authored
This re-commits r298913. o See thread http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20170327/189084.html o Tested with -DLLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY=0. Summary: ... which applies a set of `AtomicChange`s on code. Reviewers: klimek, djasper Reviewed By: djasper Subscribers: arphaman, mgorny, chapuni, cfe-commits Differential Revision: https://reviews.llvm.org/D30777 llvm-svn: 309548
-
- Jul 21, 2017
-
-
Alex Lorenz authored
llvm-svn: 308737
-
Alex Lorenz authored
std::pair in emplace back couldn't be constructed because SNodeId has an explicit constructor. Not sure how this even compiled on my machine before. llvm-svn: 308734
-
Alex Lorenz authored
llvm-svn: 308733
-
Alex Lorenz authored
This is the first commit for the "Clang-based C/C++ diff tool" GSoC project. ASTDiff is a new library that computes a structural AST diff between two ASTs using the gumtree algorithm. Clang-diff is a new Clang tool that will show the structural code changes between different ASTs. Patch by Johannes Altmanninger! Differential Revision: https://reviews.llvm.org/D34329 llvm-svn: 308731
-
- Jul 14, 2017
-
-
Sterling Augustine authored
D34304 created a way for ToolInvocations to conditionally generate dependency files, and updated call sites to preserve the old behavior of not generating them by default. CompilerInvocations... Summary: ...are yet another call-path that needs updating to preserve the old behavior. Reviewers: klimek, echristo Reviewed By: echristo Subscribers: echristo, cfe-commits Differential Revision: https://reviews.llvm.org/D35131 llvm-svn: 308043
-
- Jul 13, 2017
-
-
Alex Lorenz authored
a declaration at location and for class that searches for all occurrences of a specific declaration This commit uses a single RecursiveSymbolVisitor class for both USRLocFindingASTVisitor and NamedDeclOccurrenceFindingVisitor to avoid duplicate traversal code. It also traverses nested name specifier locs in the new class and remove the separate matching step. Differential Revision: https://reviews.llvm.org/D34949 llvm-svn: 307898
-
- Jul 07, 2017
-
-
Sterling Augustine authored
Summary: Use an argument adjuster to preserve behavior inadvertantly changed by D34304. Reviewers: klimek Differential Revision: https://reviews.llvm.org/D35095 llvm-svn: 307329
-
- Jul 06, 2017
-
-
Sterling Augustine authored
Summary: Most clang tools should ignore the -M family of options because one wouldn't want them to generate a new dependency (.d) file. However, some tools may want this dependency file. This patch creates a mechanism for them to do this. This implementation just plumbs a boolean down several layers of calls. Each of the modified calls has several call sites, and so a single member variable or new API entry point won't work. An alternative would be to write a function to filter the -M family of arguments out of CC1Args, and have each caller call that function by hand before calling newInvocation, Invocation::run, or buildAstFromCodeWithArgs. This is a more complicated and error-prone solution. Why burden all the callers to remember to use this function? But I could rewrite this patch to use that method if that is deemed more appropriate. Reviewers: klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D34304 llvm-svn: 307315
-
- Jul 05, 2017
-
-
Alexander Kornienko authored
llvm-svn: 307143
-
- Jun 30, 2017
-
-
Richard Smith authored
This is a short-term fix for PR33650 aimed to get the modules build bots green again. Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR macros to try to locally specialize a global template for a global type. That's not how C++ works. Instead, we now centrally define how to format vectors of fundamental types and of string (std::string and StringRef). We use flow formatting for the former cases, since that's the obvious right thing to do; in the latter case, it's less clear what the right choice is, but flow formatting is really bad for some cases (due to very long strings), so we pick block formatting. (Many of the cases that were using flow formatting for strings are improved by this change.) Other than the flow -> block formatting change for some vectors of strings, this should result in no functionality change. Differential Revision: https://reviews.llvm.org/D34907 Corresponding LLVM change is r306878. llvm-svn: 306881
-
Alex Lorenz authored
The core engine of clang-rename will be used for local and global renames in the new refactoring engine, as mentioned in http://lists.llvm.org/pipermail/cfe-dev/2017-June/054286.html. The clang-rename tool is still supported but might get deprecated in the future. Differential Revision: https://reviews.llvm.org/D34696 llvm-svn: 306840
-
- Jun 29, 2017
-
-
Alex Lorenz authored
arguments when `-fsyntax-only` is used Previously, Clang failed to create a fixed compilation database when the compilation arguments use -fsyntax-only instead of -c. This commit fixes the issue by forcing Clang to look at the compilation job when stripping the positional arguments. Differential Revision: https://reviews.llvm.org/D34687 llvm-svn: 306659
-
- May 24, 2017
-
-
Serge Pavlov authored
Now FixedCompilationDatabase::loadFromCommandLine has no means to report which error occurred if it fails to create compilation object. This is a block for implementing D33013, because after that change driver will refuse to create compilation if command line contains erroneous options. This change adds additional argument to loadFromCommandLine, which is assigned error message text if compilation object was not created. This is the same way as other methods of CompilationDatabase report failure. Differential Revision: https://reviews.llvm.org/D33272 llvm-svn: 303741
-
- May 12, 2017
-
-
Alexander Shaposhnikov authored
This diff 1. adds missing "explicit" for single argument constructors 2. adds missing std::move in ReplaceNodeWithTemplate constructor Test plan: make check-all Differential revision: https://reviews.llvm.org/D33061 llvm-svn: 302855
-
- May 11, 2017
-
-
NAKAMURA Takumi authored
llvm-svn: 302741
-
- May 10, 2017
-
-
Eric Liu authored
Summary: This is the first change as part of developing a clang-query based search and replace tool. Reviewers: klimek, bkramer, ioeric, sbenza, jbangert Reviewed By: ioeric, jbangert Subscribers: sbenza, ioeric, cfe-commits Patch by Julian Bangert! Differential Revision: https://reviews.llvm.org/D29621 llvm-svn: 302624
-
- May 05, 2017
-
-
Krasimir Georgiev authored
Summary: The Database check looks redundant. Reviewers: bkramer Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D32909 llvm-svn: 302236
-