[PATCH] D42577: [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch.

2018-01-26 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: bkramer. Herald added subscribers: cfe-commits, hintonda, mgorny. Repository: rC Clang https://reviews.llvm.org/D42577 Files: include/clang/Lex/HeaderSearch.h lib/Lex/HeaderSearch.cpp unittests/Lex/CMakeLists.txt unittests/Lex/Head

[PATCH] D42575: [clangd] Better handling symbols defined in macros.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:108 +std::string PrintableLoc(SourceLocation Loc, SourceManager &SM) { + if (Loc.isInvalid()) `PrintLoc`? `PrintableLoc` sounds like a checker for whether a location is printable. ==

[PATCH] D42638: [clangd] Add a fallback directory for collected symbols with relative paths.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: hokein, sammccall. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42638 Files: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp clangd/in

[PATCH] D42419: [clangd] Use new URI with scheme support in place of the existing LSP URI

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 131775. ioeric added a comment. - Merge remote-tracking branch 'origin/master' into uri Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42419 Files: clangd/ClangdLSPServer.cpp clangd/Protocol.cpp clangd/Protocol.h clangd/URI.cpp cla

[PATCH] D42577: [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323647: [Lexer] Support adding working directory to relative search dir for #include… (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.l

[PATCH] D42577: [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323647: [Lexer] Support adding working directory to relative search dir for #include… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D42577?vs=131777&id=131781#to

[PATCH] D42577: [Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 131777. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed review comments. Repository: rC Clang https://reviews.llvm.org/D42577 Files: include/clang/Lex/HeaderSearch.h lib/Lex/HeaderSearch.cpp unittests/Lex/CMakeLists.txt

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added subscribers: cfe-commits, hintonda, jkorous-apple, ilya-biryukov, mgorny, klimek. o Collect suitable #include paths for index symbols. This also does smart mapping for STL symbols and IWYU pragma. o For global code completion, add a command for insertin

[PATCH] D42638: [clangd] Add a fallback directory for collected symbols with relative paths.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 131799. ioeric marked 3 inline comments as done. ioeric added a comment. - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42638 Files: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp clangd/index/Symbo

[PATCH] D42638: [clangd] Add a fallback directory for collected symbols with relative paths.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp:41 +llvm::cl::desc( +"For symbols' file paths that cannot be resolved to absolute " +"paths (i.e. in-memory VFS without absolute paths), " sammc

[PATCH] D42638: [clangd] Add a fallback directory for collected symbols with relative paths.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE323658: [clangd] Add a fallback directory for collected symbols with relative paths. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D42638?vs=131799&id=131800#t

[PATCH] D42638: [clangd] Add a fallback directory for collected symbols with relative paths.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323658: [clangd] Add a fallback directory for collected symbols with relative paths. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.ll

[PATCH] D42419: [clangd] Use new URI with scheme support in place of the existing LSP URI

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 131802. ioeric marked an inline comment as done. ioeric added a comment. - addressed review comments; removed URI hack in vscode extenstion. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42419 Files: clangd/ClangdLSPServer.cpp clangd/Pr

[PATCH] D42419: [clangd] Use new URI with scheme support in place of the existing LSP URI

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE323660: [clangd] Use new URI with scheme support in place of the existing LSP URI (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D42419?vs=131802&id=131803#toc

[PATCH] D42639: [clang-move] Clever on handling header file which includes itself.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-move/ClangMove.cpp:708 +// Find old.h includes "old.h". +if (AbsoluteOldHeader == AbsoluteOldHeader) { + OldHeaderIncludeRangeInHeader = IncludeFilenameRange; This check is always true? ==

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-01-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Tooling/Tooling.cpp:404 if (CompileCommandsForFile.empty()) { // FIXME: There are two use cases here: doing a fuzzy // "find . -name '*.cc' |xargs tool" match, where as a user I don't care bkramer w

[PATCH] D42669: [clangd] Enable completion index by default, limit results to 100.

2018-01-30 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. Woohoo! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42639: [clang-move] Clever on handling header file which includes itself.

2018-01-31 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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D42575: [clangd] Better handling symbols defined in macros.

2018-01-31 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: clangd/index/SymbolCollector.cpp:127 +// location instead. +if (llvm::StringRef(PrintableLoc(Loc, SM)).startswith(" ioeric wrote: > > To reduce some co

[PATCH] D42735: [clangd] Add a test URI scheme for lit tests to unbreak platform-specific URI failures.

2018-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. This should also fix the current windows buildbot breakage (http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/9838/steps/ninja%20check%20

[PATCH] D42735: [clangd] Add a test URI scheme for lit tests to unbreak platform-specific URI failures.

2018-01-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 132180. ioeric marked 4 inline comments as done. ioeric added a comment. - Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42735 Files: clangd/ClangdLSPServer.cpp clangd/Protocol.cpp test/clangd/authority-less

[PATCH] D42735: [clangd] Add a test URI scheme for lit tests to unbreak platform-specific URI failures.

2018-01-31 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE323885: [clangd] Add a test URI scheme for lit tests to unbreak platform-specific URI… (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D42735?vs=132180&id=132181

[PATCH] D42735: [clangd] Add a test URI scheme for lit tests to unbreak platform-specific URI failures.

2018-01-31 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323885: [clangd] Add a test URI scheme for lit tests to unbreak platform-specific URI… (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-02-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Tooling/Tooling.cpp:404 if (CompileCommandsForFile.empty()) { // FIXME: There are two use cases here: doing a fuzzy // "find . -name '*.cc' |xargs tool" match, where as a user I don't care bkramer w

[PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-01 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: sammccall, hokein. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42796 Files: clangd/index/SymbolCollector.cpp unittests/clangd/SymbolCollectorT

[PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324065: [clangd] Skip inline namespace when collecting scopes for index symbols. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.o

[PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 132552. ioeric added a comment. - clang-format Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42796 Files: clangd/index/SymbolCollector.cpp unittests/clangd/SymbolCollectorTests.cpp Index: unittests/clangd/SymbolCollectorTests.cpp =

[PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/SymbolCollector.cpp:69 +// qualifier. Inline namespaces and unscoped enums are skipped. +llvm::Expected getScope(const NamedDecl *ND) { + llvm::SmallVector Contexts; hokein wrote: > There is a `SuppressUnwri

[PATCH] D42796: [clangd] Skip inline namespace when collecting scopes for index symbols.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 132549. ioeric marked 2 inline comments as done. ioeric edited the summary of this revision. ioeric added a comment. Addressed review comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42796 Files: clangd/index/SymbolCollector.cpp

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D42361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 132624. ioeric added a comment. removed FIXME Repository: rC Clang https://reviews.llvm.org/D42361 Files: include/clang/Tooling/Tooling.h lib/Tooling/Tooling.cpp Index: lib/Tooling/Tooling.cpp

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC324113: [Tooling] Returns non-zero status code when files are skipped. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D42361?vs=132624&id=132626#toc Repository:

[PATCH] D42361: [Tooling] Returns non-zero status code when files are skipped.

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL324113: [Tooling] Returns non-zero status code when files are skipped. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42361

[PATCH] D42857: testing phabricator email reply

2018-02-02 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added subscribers: cfe-commits, klimek. ioeric removed rCTE Clang Tools Extra as the repository for this revision. ioeric removed subscribers: klimek, cfe-commits. ioeric added a comment. top Comment Comment at: change-namespace/ChangeNamesp

[PATCH] D42915: [clangd] Use URIs in index symbols.

2018-02-05 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: hokein, sammccall. Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42915 Files: clangd/index/Index.cpp clangd/index/Index.h clangd/index/Merge.c

[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] 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 ___ cfe-commi

[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] 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 &File : ChangedFiles) { const auto *Entry = FileMgr.getFile(File); hokein wrote: > Is this duplicated as we already have "dump_results" option n

[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: change-namespace/tool

[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 nam

[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&id=88211#toc Repository: rL LLVM https

[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 unittests/change-nam

[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 test/change-namespace/Inputs/fake-s

[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 change-namespace/tool/ClangChangeName

[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 for

[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 better, > with that we don't ne

[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&id=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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[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: include/clang/Tooling/Refacto

[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::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 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: > > a

[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 lib/Tooling/Refactoring/AtomicChan

[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: unittests/change-namespace/ChangeNamespaceT

[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: unittests/change-namespace/ChangeNamesp

[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&id=90141#toc Repository: rL LL

[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" conflic

[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&id=90165#toc Repository: rL LLVM https

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: test/clang-tidy/readability-braces-around-statements-format.cpp:1 +// RUN: %check_clang_tidy %s readability-braces-around-statements %t -- -format -- + alexfh wrote: > malcolm.parsons wrote: > > Will clang-tidy look for

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-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 https://reviews.llvm.org/D30564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D30564: [clang-tidy] Format code around applied fixes

2017-03-03 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tidy/ClangTidy.cpp:214 + llvm::errs() << llvm::toString(Replacements.takeError()) << "\n"; + continue; +} Maybe still apply the replacements if formatting fails? https://reviews.llvm.org/

[PATCH] D30735: Add missing implementation for AtomicChange::replace(...)

2017-03-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Just realized the implementation is missing... https://reviews.llvm.org/D30735 Files: lib/Tooling/Refactoring/AtomicChange.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/RefactoringTest.cpp =

[PATCH] D30735: Add missing implementation for AtomicChange::replace(...)

2017-03-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 91010. ioeric added a comment. - Removed unnecessary variable. https://reviews.llvm.org/D30735 Files: lib/Tooling/Refactoring/AtomicChange.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/RefactoringTest.cpp ==

[PATCH] D30735: Add missing implementation for AtomicChange::replace(...)

2017-03-08 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297289: Add missing implementation for AtomicChange::replace(...) (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D30735?vs=91010&id=91020#toc Repository: rL LLVM https://rev

[PATCH] D30777: Added `applyAtomicChanges` function.

2017-03-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ... which applies a set of `AtomicChange`s on code. https://reviews.llvm.org/D30777 Files: include/clang/Tooling/Refactoring/AtomicChange.h lib/Tooling/Refactoring/AtomicChange.cpp unittests/Tooling/RefactoringTest.cpp Index: unittests/Tooling/RefactoringTes

[PATCH] D30777: Added `applyAtomicChanges` function.

2017-03-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 91163. ioeric marked 2 inline comments as done. ioeric added a comment. - Addressed comments; stylized code. https://reviews.llvm.org/D30777 Files: include/clang/Tooling/Refactoring/AtomicChange.h lib/Tooling/Refactoring/AtomicChange.cpp unittests/Tool

[PATCH] D30777: Added `applyAtomicChanges` function.

2017-03-09 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/AtomicChange.h:147-149 +/// This completely ignores the file path in each change and replaces them with +/// \p FilePath, i.e. callers are responsible for ensuring all changes are for +/// the same file.

[PATCH] D30777: Added `applyAtomicChanges` function.

2017-03-10 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 91288. ioeric marked 7 inline comments as done. ioeric added a comment. - Addressed review comments. https://reviews.llvm.org/D30777 Files: include/clang/Tooling/Refactoring/AtomicChange.h lib/Tooling/Refactoring/AtomicChange.cpp unittests/Tooling/Refa

[PATCH] D30813: [clang-rename] Introduce an unittest skeleton for clang-rename.

2017-03-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. lg Comment at: unittests/clang-rename/ClangRenameTests.cpp:91 +"#include \"%s\"\n%s", HeaderName.c_str(), Expected.str().c_str()); +EXPECT_EQ(format(ExpectedCode)

[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&id=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] 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 forward-declara

[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&id=79308#toc Repository: r

[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: unittests/change-

[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 unittests/change-namespace/ChangeNamespaceTests.c

[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: unittests/change-namespace/ChangeNa

[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&id=79559#toc Repository: rL LLVM https://revie

[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 http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[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 &SM, 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 &SM, 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 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 uni

[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 &SM, SourceLocation KeyPosition); + ioeric wrote: > klimek wrote: > > ioeric 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 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 lib/Tooling/Refactoring/CMakeLists.t

[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 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
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: test/ch

[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&id=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 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: unittests/Format/Clea

[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: unittests/Format/CleanupTest

[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 &Style, djasper wrote: > I am somewhat hesi

[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: unittests/Format/CleanupTes

[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&id=80045#toc Repository:

[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 n

[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
This revision was automatically updated to reflect the committed changes. Closed by commit rL288908: [change-namespace] move template class forward-declarations and don't move fwd… (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27515?vs=80571&id=80586#toc Repository:

[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:

<    10   11   12   13   14   15   16   >