[PATCH] D29622: Add a batch query and replace tool based on AST matchers.

2017-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-query/QueryReplace.cpp:1 +#include "QueryReplace.h" +#include "QueryParser.h" Please add license header. Comment at: clang-query/QueryReplace.cpp:37 + +llvm::ErrorOr

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Tooling/RefactoringCallbacks.cpp:42 + void HandleTranslationUnit(ASTContext ) override { +for (const auto : Refactoring.Callbacks) { + Callback->getReplacements().clear(); Could you add a comment here

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Tooling/RefactoringCallbacks.cpp:160 +llvm::Expected +ReplaceNodeWithTemplate::create(StringRef FromId, StringRef ToTemplate) { + std::vector ParsedTemplate; Is this covered in the test?

[PATCH] D29447: [change-namespace] check using shadow decl correctly when shortening namespace specifiers.

2017-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. This fixes mismatch between template decls and template specialization decls. Also added a few more test cases. https://reviews.llvm.org/D29447 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D29447: [change-namespace] check using shadow decl correctly when shortening namespace specifiers.

2017-02-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293897: [change-namespace] check using shadow decl correctly when shortening namespace… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D29447?vs=86795=86815#toc Repository:

[PATCH] D29460: [change-namespace] fi unscoped enum const^Ct references.

2017-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. https://reviews.llvm.org/D29460 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp === ---

[PATCH] D29460: [change-namespace] fix unscoped enum constant references.

2017-02-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293909: [change-namespace] fix unscoped enum constant references. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D29460?vs=86835=86843#toc Repository: rL LLVM

[PATCH] D28983: clang-format: remove tests that assume no config file will be found as this is not always the case

2017-01-22 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm https://reviews.llvm.org/D28983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29176: [change-namespace] add leading '::' to references in new namespace when name conflict is possible.

2017-01-26 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293182: [change-namespace] add leading '::' to references in new namespace when name… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D29176?vs=85903=85904#toc Repository: rL

[PATCH] D29176: [change-namespace] add leading '::' to references in new namespace when name conflict is possible.

2017-01-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 85903. ioeric marked 3 inline comments as done. ioeric added a comment. - Addressed comments. https://reviews.llvm.org/D29176 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D29176: [change-namespace] add leading '::' to references in new namespace when name conflict is possible.

2017-01-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. For example, when we change 'na' to "nb::nc", we need to add leading '::' to references "::nc::X" in the changed namespace. https://reviews.llvm.org/D29176 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D29182: [change-namespace] correctly shorten namespace when references have leading '::'

2017-01-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. https://reviews.llvm.org/D29182 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp === ---

[PATCH] D29182: [change-namespace] correctly shorten namespace when references have leading '::'

2017-01-26 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293187: [change-namespace] correctly shorten namespace when references have leading '::' (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D29182?vs=85917=85919#toc Repository:

[PATCH] D28943: [clang-format] Remove redundant test in style-on-command-line.cpp

2017-01-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D28943#651488, @amaiorano wrote: > In https://reviews.llvm.org/D28943#651470, @ioeric wrote: > > > @amaiorano: The test itself is correct. It's just that this test failed in > > our internal test. We could've fixed it internally, but the fix

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 89627. ioeric added a comment. - removed a debug message https://reviews.llvm.org/D30328 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h change-namespace/tool/ClangChangeNamespace.cpp

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. https://reviews.llvm.org/D30328 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h change-namespace/tool/ClangChangeNamespace.cpp test/change-namespace/Inputs/fake-std.h test/change-namespace/white-list.cpp

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 89637. ioeric marked an inline comment as done. ioeric added a comment. - Make the whitelist an option. https://reviews.llvm.org/D30328 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. PTAL Comment at: change-namespace/tool/ClangChangeNamespace.cpp:78 +// changing namespaces around them. +constexpr const char *WhiteListedSymbolPatterns[] = {"^std::.*$"}; + hokein wrote: > Maybe consider create a command-line option

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 89640. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed comments. https://reviews.llvm.org/D30328 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h change-namespace/tool/ClangChangeNamespace.cpp

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:82 + +llvm::ErrorOr GetWhiteListedSymbolPatterns() { + llvm::SmallVector Lines; hokein wrote: > Instead `std::vector`, maybe std::vector is

[PATCH] D30328: [change-namepsace] make it possible to whitelist symbols so they don't get updated.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296110: [change-namepsace] make it possible to whitelist symbols so they don't get… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D30328?vs=89640=89643#toc Repository: rL

[PATCH] D30337: [clang-move] Extend clang-move to support moving global variable.

2017-02-24 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg https://reviews.llvm.org/D30337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 88208. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D29893 Files: change-namespace/ChangeNamespace.cpp change-namespace/tool/ClangChangeNamespace.cpp Index:

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added a subscriber: fhahn. https://reviews.llvm.org/D29893 Files: change-namespace/ChangeNamespace.cpp change-namespace/tool/ClangChangeNamespace.cpp Index: change-namespace/tool/ClangChangeNamespace.cpp

[PATCH] D29886: [clangd] Wire up ASTUnit and publish diagnostics with it.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ASTManager.cpp:21 +using namespace clang; +using namespace clangd; + Any reason not to wrap code in namespaces instead? https://reviews.llvm.org/D29886 ___

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:137 + + for (const auto : ChangedFiles) { const auto *Entry = FileMgr.getFile(File); hokein wrote: > Is this duplicated as we already have "dump_results" option now?

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294969: [change-namespace] add an option to dump changed files in YAML. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D29893?vs=88208=88211#toc Repository: rL LLVM

[PATCH] D29893: [change-namespace] add an option to dump changed files in YAML.

2017-02-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: change-namespace/tool/ClangChangeNamespace.cpp:68 +cl::opt +DumpYAML("dump_yaml", + cl::desc("Dump new file content in YAML, if specified."), hokein wrote: > hokein wrote: > > `dump_result` maybe a clearer

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Looks good. Could you also add test cases where `ReplaceNodeWithTemplate::create` fails to parse templates? https://reviews.llvm.org/D29621 ___

[PATCH] D28895: [clang-move] Also move using decls which are defined in header file.

2017-01-19 Thread Eric Liu via Phabricator via cfe-commits
ioeric requested changes to this revision. ioeric added a comment. This revision now requires changes to proceed. Per offline discussion, this change is not intact - we want using decls in headers to be moveable symbols as well since it can have references outside of the local TU.

[PATCH] D28293: [clang-move] Dump enum and type alias declarations.

2017-01-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg https://reviews.llvm.org/D28293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28315: Update tools to use new getStyle API

2017-01-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Let me know when broken tests are fixed and this patch (and the corresponding patch) is ready again for review. Also let me know if you need any help. Comment at: change-namespace/ChangeNamespace.cpp:892 + llvm::errs() <<

[PATCH] D28315: Update tools to use new getStyle API

2017-01-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm. Thanks! https://reviews.llvm.org/D28315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28315: Update tools to use new getStyle API

2017-01-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D28315#647154, @amaiorano wrote: > In https://reviews.llvm.org/D28315#647103, @ioeric wrote: > > > Let me know when broken tests are fixed and this patch (and the > > corresponding patch) is ready again for review. Also let me know if you > >

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm. Thanks! https://reviews.llvm.org/D28081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28774: [clang-move] Ignore using decls which are defined in macros.

2017-01-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg. Comment at: test/clang-move/no-move-macro-helpers.cpp:1 +// RUN: mkdir -p %T/no-move-macro-helper +// RUN: cp %S/Inputs/macro_helper_test.h

[PATCH] D28801: [clang-move] Handle helpers with forward declarations.

2017-01-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lgtm. https://reviews.llvm.org/D28801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28799: [llvm-objdump tests] Copy the inputs of tests closer to tests.

2017-01-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. @davide I think this change makes sense. I'll accept this to unbreak our internal build. Let us know if you have any concern. https://reviews.llvm.org/D28799

[PATCH] D28943: [clang-format] Remove redundant test in style-on-command-line.cpp

2017-01-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. @amaiorano: The test itself is correct. It's just that this test failed in our internal test. We could've fixed it internally, but the fix would be ugly. Since the intended behavior is

[PATCH] D28943: [clang-format] Remove redundant test in style-on-command-line.cpp

2017-01-20 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D28943#651536, @amaiorano wrote: > In https://reviews.llvm.org/D28943#651489, @ioeric wrote: > > > In https://reviews.llvm.org/D28943#651488, @amaiorano wrote: > > > > > In https://reviews.llvm.org/D28943#651470, @ioeric wrote: > > > > > > >

[PATCH] D27054: Introducing clang::tooling::AtomicChange for refactoring tools.

2017-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 90018. ioeric marked 3 inline comments as done. ioeric added a comment. - Return const refs in getXXX. https://reviews.llvm.org/D27054 Files: include/clang/Tooling/Refactoring/AtomicChange.h lib/Tooling/CMakeLists.txt

[PATCH] D27054: Introducing clang::tooling::AtomicChange for refactoring tools.

2017-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/AtomicChange.h:59 + /// \brief Returns the path of the file containing this atomic change. + std::string getFilePath() const { return FilePath; } + alexshap wrote: > ioeric wrote: > >

[PATCH] D27054: Introducing clang::tooling::AtomicChange for refactoring tools.

2017-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 90012. ioeric marked an inline comment as done. ioeric added a comment. - Addressed comments. https://reviews.llvm.org/D27054 Files: include/clang/Tooling/Refactoring/AtomicChange.h lib/Tooling/CMakeLists.txt lib/Tooling/Refactoring/AtomicChange.cpp

[PATCH] D27054: Introducing clang::tooling::AtomicChange for refactoring tools.

2017-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/AtomicChange.h:59 + /// \brief Returns the path of the file containing this atomic change. + std::string getFilePath() const { return FilePath; } +

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2017-02-28 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 90011. ioeric added a comment. - Addressed review comments. - Make key customize-able. - Added replace() and insert() to replace current replacement interfaces. - s/EditList/AtomicChange/ https://reviews.llvm.org/D27054 Files:

[PATCH] D30490: [change-namespace] get insertion points of forward declarations correct.

2017-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Previously, the insertion points would conflict with the old namespace deletion. https://reviews.llvm.org/D30490 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D30490: [change-namespace] get insertion points of forward declarations correct.

2017-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 90135. ioeric added a comment. - Create a new test case. And slight refactor. https://reviews.llvm.org/D30490 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D30490: [change-namespace] get insertion points of forward declarations correct.

2017-03-01 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296604: [change-namespace] get insertion points of forward declarations correct. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D30490?vs=90135=90141#toc Repository: rL LLVM

[PATCH] D30493: [change-namespace] avoid adding leading '::' when possible.

2017-03-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. When changing namespaces, the tool adds leading "::" to references that need to be fully-qualified, which would affect readability. We avoid adding "::" when the symbol name does not conflict with the new namespace name. For example, a symbol name "na::nb::X"

[PATCH] D27054: Introducing clang::tooling::AtomicChange for refactoring tools.

2017-03-01 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296616: Introducing clang::tooling::AtomicChange for refactoring tools. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27054?vs=90018=90165#toc Repository: rL LLVM

[PATCH] D27132: Do not do raw name replacement when FromDecl is a class forward-declaration.

2016-11-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. If the `FromDecl` is a class forward declaration, the reference is still considered as referring to the original definition given the nature of

[PATCH] D27132: Do not do raw name replacement when FromDecl is a class forward-declaration.

2016-11-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79307. ioeric marked an inline comment as done. ioeric added a comment. - Address comments. https://reviews.llvm.org/D27132 Files: lib/Tooling/Core/Lookup.cpp unittests/Tooling/LookupTest.cpp Index: unittests/Tooling/LookupTest.cpp

[PATCH] D27132: Do not do raw name replacement when FromDecl is a class forward-declaration.

2016-11-25 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287929: Do not do raw name replacement when FromDecl is a class forward-declaration. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27132?vs=79307=79308#toc Repository: rL

[PATCH] D27125: Consider nested namespaces in the canonical namespace as canonical as well.

2016-11-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Testing sender again https://reviews.llvm.org/D27125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27125: Consider nested namespaces in the canonical namespace as canonical as well.

2016-11-25 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL287924: Consider nested namespaces in the canonical namespace as canonical as well. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27125?vs=79295=79296#toc Repository: rL

[PATCH] D27125: Consider nested namespaces in the canonical namespace as canonical as well.

2016-11-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79295. ioeric marked an inline comment as done. ioeric added a comment. - Address review comment. https://reviews.llvm.org/D27125 Files: lib/Tooling/Core/Lookup.cpp unittests/Tooling/LookupTest.cpp Index: unittests/Tooling/LookupTest.cpp

[PATCH] D27523: [change-namespace] don't fix using shadow decls in classes.

2016-12-07 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288919: [change-namespace] don't fix using shadow decls in classes. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27523?vs=80613=80615#toc Repository: rL LLVM

[PATCH] D27523: [change-namespace] don't fix using shadow decls in classes.

2016-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80613. ioeric added a comment. - address review comment. https://reviews.llvm.org/D27523 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespace/ChangeNamespaceTests.cpp

[PATCH] D27615: [clang-format] calculate MaxInsertOffset in the original code correctly.

2016-12-09 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289203: [clang-format] calculate MaxInsertOffset in the original code correctly. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27615?vs=80878=80888#toc Repository: rL LLVM

[PATCH] D27615: [clang-format] calculate MaxInsertOffset in the original code correctly.

2016-12-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D27615 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp

[PATCH] D27758: [change-namespace] don't crash when type reference is in function type parameter list.

2016-12-14 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289672: [change-namespace] don't crash when type reference is in function type… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27758?vs=81388=81400#toc Repository: rL LLVM

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-move/UsedHelperDeclFinder.cpp:22 +// by a single node which belongs to that class. +const Decl *getOutmostEnclosingClassOrFunDecl(const Decl *D) { + const auto *DC = D->getDeclContext(); Maybe just

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-16 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Code is almost good. I'm just still a bit confused by names. Comment at: clang-move/ClangMove.cpp:459 // - auto InOldCCNamedOrGlobalNamespace = -

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. First round of comments. Comment at: clang-move/ClangMove.cpp:492 + isDefinition(), unless(InMovedClass), InOldCC, + anyOf(isStaticStorageClass(), hasParent(namespaceDecl(isAnonymous(); + auto HelperFuncOrVar =

[PATCH] D27713: [clang-move] Fix incorrect EndLoc for declarations in macros.

2016-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg https://reviews.llvm.org/D27713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27515: [change-namespace] move template class forward-declarations and don't move fwd-decls in classes.

2016-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. ioeric added a subscriber: cfe-commits. Forward declarations in moved namespaces should be moved back to the old namespaces. We should also move template class forward declarations. Also fix a bug that moves forward declarations of

[PATCH] D27523: [change-namespace] don't fix using shadow decls in classes.

2016-12-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. ioeric added a subscriber: cfe-commits. Using shadow declarations in classes always refers to base class, which does not need to be fixed/qualified since it can be inferred from inheritance. https://reviews.llvm.org/D27523 Files:

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 81555. ioeric marked 2 inline comments as done. ioeric added a comment. - Comments addressed https://reviews.llvm.org/D27801 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289799: [change-namespace] handling templated type aliases correctly. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27801?vs=81555=81557#toc Repository: rL LLVM

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Second rounds. Will start reviewing `CallGraph` code next. Comment at: clang-move/ClangMove.cpp:492 + isDefinition(), unless(InMovedClass), InOldCC, + anyOf(isStaticStorageClass(), hasParent(namespaceDecl(isAnonymous(); + auto

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. This fixes templated type aliases and templated type aliases in classes. https://reviews.llvm.org/D27801 Files: change-namespace/ChangeNamespace.cpp

[PATCH] D27758: [change-namespace] don't crash when type reference is in function type parameter list.

2016-12-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D27758 Files: change-namespace/ChangeNamespace.cpp test/change-namespace/lambda-function.cpp Index: test/change-namespace/lambda-function.cpp

[PATCH] D28671: [ASTMatchers] add typeAliasTemplateDecl matcher.

2017-01-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. https://reviews.llvm.org/D28671 Files: include/clang/ASTMatchers/ASTMatchers.h unittests/ASTMatchers/ASTMatchersNodeTest.cpp Index:

[PATCH] D28672: [ASTMatchers] update doc by running dump_ast_matchers.py

2017-01-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: klimek. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D28672 Files: docs/LibASTMatchersReference.html Index: docs/LibASTMatchersReference.html === ---

[PATCH] D28235: [clang-format cleanup] merge continuous deleted lines into one deletion.

2017-01-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. post-vacation ping :) https://reviews.llvm.org/D28235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288493: [ClangFormat] Only insert #include into the #include block in the beginning of… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D26909?vs=80044=80045#toc Repository:

[PATCH] D27302: [change-namespace] don't generate replacements for files that don't match file pattern.

2016-12-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D27302 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h test/change-namespace/Inputs/macro.h test/change-namespace/macro.cpp

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79736. ioeric added a comment. - Added replace() and insert() to replace current replacement interfaces. https://reviews.llvm.org/D27054 Files: include/clang/Tooling/Refactoring/EditList.h lib/Tooling/CMakeLists.txt

[PATCH] D27302: [change-namespace] don't generate replacements for files that don't match file pattern.

2016-12-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79927. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed comments. https://reviews.llvm.org/D27302 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h test/change-namespace/macro.cpp Index:

[PATCH] D27302: [change-namespace] don't generate replacements for files that don't match file pattern.

2016-12-01 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288376: [change-namespace] don't generate replacements for files that don't match file… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27302?vs=79927=79929#toc Repository:

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80044. ioeric marked an inline comment as done. ioeric added a comment. - Addressed comment. https://reviews.llvm.org/D26909 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80042. ioeric marked an inline comment as done. ioeric added a comment. - Updated comments. https://reviews.llvm.org/D26909 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Format/Format.cpp:1521 +// tokens and returns an offset after the sequence. +unsigned getOffsetAfterTokenSequence( +StringRef FileName, StringRef Code, const FormatStyle , djasper wrote: > I am somewhat hesitant

[PATCH] D26909: [ClangFormat] Only insert #include into the #include block in the beginning of the file.

2016-12-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 80039. ioeric added a comment. - Merge branch 'master' of http://llvm.org/git/clang into insert - Still delete #include's in code. https://reviews.llvm.org/D26909 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index:

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288139: [change-namespace] fix non-calling function references. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27208?vs=79558=79559#toc Repository: rL LLVM

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79555. ioeric marked 3 inline comments as done. ioeric added a comment. - Address comments. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h

[PATCH] D27208: [change-namespace] fix non-calling function references.

2016-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79558. ioeric added a comment. - Format code. https://reviews.llvm.org/D27208 Files: change-namespace/ChangeNamespace.cpp change-namespace/ChangeNamespace.h unittests/change-namespace/ChangeNamespaceTests.cpp Index:

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping. Daniel, could you take a look? Manuel and I would like your opinion on this. https://reviews.llvm.org/D27054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79716. ioeric marked 4 inline comments as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D27054 Files: include/clang/Tooling/Refactoring/EditList.h lib/Tooling/CMakeLists.txt lib/Tooling/Refactoring/CMakeLists.txt

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:41 + /// \brief Creates an edit list for a key position. + EditList(const SourceManager , SourceLocation KeyPosition); + djasper wrote: > I wonder whether we should always

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:41 + /// \brief Creates an edit list for a key position. + EditList(const SourceManager , SourceLocation KeyPosition); + klimek wrote: > ioeric wrote: > > djasper wrote: > >

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:82-94 + /// \brief Adds a replacement that inserts \p Text at \p Loc. If this + /// insertion conflicts with an existing insertion (at the same position), + /// this will be inserted before

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 79728. ioeric added a comment. - Make key customize-able. https://reviews.llvm.org/D27054 Files: include/clang/Tooling/Refactoring/EditList.h lib/Tooling/CMakeLists.txt lib/Tooling/Refactoring/CMakeLists.txt lib/Tooling/Refactoring/EditList.cpp

[PATCH] D27054: Introducing clang::tooling::EditList for refactoring tools.

2016-11-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/EditList.h:41 + /// \brief Creates an edit list for a key position. + EditList(const SourceManager , SourceLocation KeyPosition); + ioeric wrote: > klimek wrote: > > ioeric wrote: > >

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. The patch LGTM now. I'll accept both this and the one for clang-tool-extra when it is ready. Regarding builbots, we have bots that continually run builds/tests (http://lab.llvm.org:8011/). Many buildbots test llvm and clang as well as clang-tools-extra (e.g. with

[PATCH] D28235: [clang-format cleanup] merge continuous deleted lines into one deletion.

2017-01-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: djasper. ioeric added a subscriber: cfe-commits. Herald added a subscriber: klimek. This cleans up "\n" among continuous lines when they are deleted. https://reviews.llvm.org/D28235 Files: lib/Format/Format.cpp

[PATCH] D28228: [clang-move] Support moving enum declarations.

2017-01-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg Comment at: clang-move/ClangMove.cpp:456 +void ClangMoveTool::addMovedAndDeletedDecl(const NamedDecl *D) { + MovedDecls.push_back(D); Remove this?

[PATCH] D28235: [clang-format cleanup] merge continuous deleted lines into one deletion.

2017-01-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 82889. ioeric added a comment. - Fixed a nit. https://reviews.llvm.org/D28235 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTest.cpp === ---

[PATCH] D28081: Make GetStyle return Expected instead of FormatStyle

2017-01-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D28081#633103, @amaiorano wrote: > Hello everyone, so after a few more tests, I've uncovered a bug and perhaps a > different meaning for fallback style. First, the bug: if you set fallback > style to "none", clang-format will perform no

  1   2   3   4   5   6   7   8   9   10   >