- 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303741 91177308-0d34-0410-b5e6-96231b3b80d8
-
- 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302855 91177308-0d34-0410-b5e6-96231b3b80d8
-
- May 11, 2017
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302741 91177308-0d34-0410-b5e6-96231b3b80d8
-
- 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302624 91177308-0d34-0410-b5e6-96231b3b80d8
-
- 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302236 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 30, 2017
-
-
Haojian Wu authored
Reviewers: ioeric Reviewed By: ioeric Subscribers: alexshap, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D31492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299073 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 29, 2017
-
-
Juergen Ributzka authored
This broke GreenDragon: http://lab.llvm.org:8080/green/job/clang-stage2-cmake-modulesRDA_build/4776/ Reverting this commit and all follow-up commits. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298967 91177308-0d34-0410-b5e6-96231b3b80d8
-
Juergen Ributzka authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298965 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 28, 2017
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298921 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: ... which applies a set of `AtomicChange`s on code. Reviewers: klimek, djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30777 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298913 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 21, 2017
-
-
Benjamin Kramer authored
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298443 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 08, 2017
-
-
Eric Liu authored
Summary: Just realized the implementation is missing... Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30735 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297289 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Mar 01, 2017
-
-
Eric Liu authored
Summary: An AtomicChange is used to create and group a set of source edits, e.g. replacements or header insertions. Edits in an AtomicChange should be related, e.g. replacements for the same type reference and the corresponding header insertion/deletion. An AtomicChange is uniquely identified by a key position and will either be fully applied or not applied at all. The key position should be the location of the key syntactical element that is being changed, e.g. the call to a refactored method. Next step: add a tool that applies AtomicChange. Reviewers: klimek, djasper Reviewed By: klimek Subscribers: alexshap, cfe-commits, djasper, mgorny Differential Revision: https://reviews.llvm.org/D27054 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296616 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 17, 2017
-
-
Antonio Maiorano authored
Change the contract of GetStyle so that it returns an error when an error occurs (i.e. when it writes to stderr), and only returns the fallback style when it can't find a configuration file. Differential Revision: https://reviews.llvm.org/D28081 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292174 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 13, 2017
-
-
David Blaikie authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291919 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
-
- Jan 03, 2017
-
-
Alexander Kornienko authored
Add a field indicating the associated check for every replacement to the YAML report generated with the '-export-fixes' option. Update clang-apply-replacements to handle the new format. Patch by Alpha Abdoulaye! Differential revision: https://reviews.llvm.org/D26137 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290892 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 23, 2016
-
-
Piotr Padlewski authored
Summary: Bunch of fixed bugs in Clang after running misc-use-after-move in clang-tidy. Reviewers: rsmith, mboehme Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D27752 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290424 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 13, 2016
-
-
Alexander Kornienko authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289543 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Dec 02, 2016
-
-
Joerg Sonnenberger authored
In bigger projects like an Operating System, the same source code is often compiled in slightly different ways. This could be the difference between PIC and non-PIC code for static vs dynamic libraries, it could also be the difference between size optimised versions of tools for ramdisk images. At the moment, the compilation database has no way to distinguish such cases. As first step, add a field in the JSON format for it and process it accordingly. Differential Revision: https://reviews.llvm.org/D27138 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288436 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 25, 2016
-
-
Joerg Sonnenberger authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287947 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: If the `FromDecl` is a class forward declaration, the reference is still considered as referring to the original definition given the nature of forward-declarations, so we can't do a raw name replacement in this case. Reviewers: bkramer Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D27132 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287929 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: For example, this case was missed when looking for different but canonical namespaces. UseContext in this case should be considered as in the canonical namespace. ``` namespace a { namespace b { <FromContext> } } namespace a { namespace b { namespace c { <UseContext> } } } ``` Added some commenting. Reviewers: bkramer Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D27125 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287924 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 22, 2016
-
-
Eric Liu authored
Summary: The new error information contains the type of error (e.g. overlap or bad file path) and the replacement(s) that is causing the error. This enables us to resolve some errors. For example, for insertion at the same location conflict, we need to know the existing replacement which conflicts with the new replacement in order to calculate the new position to be insert before/after the existing replacement (for merging). Reviewers: klimek, bkramer Subscribers: djasper, cfe-commits Differential Revision: https://reviews.llvm.org/D26853 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287639 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 07, 2016
-
-
Eric Liu authored
Summary: The current version does not deduplicate equivalent file paths correctly. For example, a relative path and an absolute path are considered inequivalent. Comparing FileEnry addresses these issues. Reviewers: djasper Subscribers: alexshap, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D26288 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286096 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Nov 03, 2016
-
-
Malcolm Parsons authored
Reviewers: aaron.ballman, mehdi_amini, dblaikie Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D26276 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285899 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 14, 2016
-
-
Eric Liu authored
Summary: If there are multiple <File, Replacements> pairs with the same file path after removing dots, we only keep one pair (with path after dots being removed) and discard the rest. Reviewers: djasper Subscribers: klimek, hokein, bkramer, cfe-commits Differential Revision: https://reviews.llvm.org/D25565 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284219 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 06, 2016
-
-
Mehdi Amini authored
As a side effect, this avoid having to call .data() on the StringRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283416 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Oct 01, 2016
-
-
Mehdi Amini authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283039 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 30, 2016
-
-
Alexander Shaposhnikov authored
This diff adds std::move to avoid copying of the Replacement NewR in the method Replacements::add. Test plan: make -j8 check-all Differential revision: https://reviews.llvm.org/D25049 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282949 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 28, 2016
-
-
Eric Liu authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282583 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Liu authored
Summary: Now two replacements are considered order-independent if applying them in either order produces the same result. These include (but not restricted to) replacements that: - don't overlap (being directly adjacent is fine) and - are overlapping deletions. - are insertions at the same offset and applying them in either order has the same effect, i.e. X + Y = Y + X if one inserts text X and the other inserts text Y. Discussion about this design can be found in D24717 Reviewers: djasper, klimek Subscribers: omtcyfz, cfe-commits Differential Revision: https://reviews.llvm.org/D24800 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282577 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 19, 2016
-
-
Eric Liu authored
Summary: Diff to r281457: - added a test case `CalculateRangesOfInsertionAroundReplacement`. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24606 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281891 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 17, 2016
-
-
Eric Liu authored
When replacements have the same offset, make replacements with smaller length order first in the set. Summary: No behavioral change intended. The change makes iterating the replacements set more intuitive in Replacements class implementation. Previously, insertion is ordered before an deletion/replacement with the same offset, which is counter-intuitive for implementation, especially for a followup patch to support adding insertions around replacements. With the current ordering, we only need to make `applyAllReplacements` iterate the replacements set reversely when applying them so that deletion/replacement is still applied before insertion with the same offset. Reviewers: klimek, djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24663 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281819 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 15, 2016
-
-
Artem Belevich authored
Commit was breaking our internal tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281557 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Sep 14, 2016
-
-
Eric Liu authored
Summary: Extend `tooling::Replacements::add()` to support adding order-independent replacements. Two replacements are considered order-independent if one of the following conditions is true: - They do not overlap. (This is already supported.) - One replacement is insertion, and the other is a replacement with length > 0, and the insertion is adjecent to but not contained in the other replacement. In this case, the replacement should always change the original code instead of the inserted text. Reviewers: klimek, djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D24515 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281457 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Aug 31, 2016
-
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280187 91177308-0d34-0410-b5e6-96231b3b80d8
-
NAKAMURA Takumi authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280186 91177308-0d34-0410-b5e6-96231b3b80d8
-