[PATCH] D34749: [clang-format] Fix parsing of msg{field}-style proto options

2017-06-28 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch makes the `{` in `msg_field{field: OK}` in a proto option scope be treated as an assignment operator. Previosly the added test case was formatted as: option (MyProto.options) = { field_a: OK field_b{field_c: O

[PATCH] D34749: [clang-format] Fix parsing of msg{field}-style proto options

2017-06-28 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 104410. krasimir added a comment. - Add a msg-style test too https://reviews.llvm.org/D34749 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestProto.cpp Index: unittests/Format/FormatTestProto.cpp ===

[PATCH] D34749: [clang-format] Fix parsing of msg{field}-style proto options

2017-06-28 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I think this is ready for a review. https://reviews.llvm.org/D34749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34749: [clang-format] Fix parsing of msg{field}-style proto options

2017-06-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306672: [clang-format] Fix parsing of msg{field}-style proto options (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D34749?vs=104410&id=104632#toc Repository: rL LLVM http

[PATCH] D34441: [clang-format] Support text proto messages

2017-06-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 104645. krasimir added a comment. - Add initial support for <>-style message fields - Added single-line tests - Added multiline message proto tests https://reviews.llvm.org/D34441 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp

[PATCH] D34441: [clang-format] Support text proto messages

2017-06-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 104646. krasimir added a comment. - Wrap-up this patch https://reviews.llvm.org/D34441 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.cpp lib/For

[PATCH] D34441: [clang-format] Support text proto messages

2017-06-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @djasper: I think this is ready for review. https://reviews.llvm.org/D34441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34936: [clangd] Add -ffreestanding on VFS tests.

2017-07-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good. https://reviews.llvm.org/D34936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D34441: [clang-format] Support text proto messages

2017-07-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 105044. krasimir marked 3 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D34441 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp lib/Format/FormatT

[PATCH] D34441: [clang-format] Support text proto messages

2017-07-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:107 + if (Style.Language == FormatStyle::LK_TextProto) { +State.Stack.back().AvoidBinPacking = true; djasper wrote: > Do we need to set this explicitly here? Is it not enough t

[PATCH] D34441: [clang-format] Support text proto messages

2017-07-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307029: [clang-format] Support text proto messages (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D34441 Files: cfe/trunk/include/clang/Format/Format.h cfe/trunk/lib/Format/C

[PATCH] D34947: [clangd] Add support for per-file extra flags

2017-07-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/GlobalCompilationDatabase.cpp:20 + const SmallVectorImpl &ExtraFlags) { + assert(Command && !Command->CommandLine.empty()); + if (!Command || ExtraFlags.empty()) ilya-biryukov wrote: >

[PATCH] D34947: [clangd] Add support for per-file extra flags

2017-07-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 105147. krasimir marked 7 inline comments as done. krasimir added a comment. - Addess review comments https://reviews.llvm.org/D34947 Files: clangd/ClangdLSPServer.cpp clangd/ClangdUnitStore.cpp clangd/GlobalCompilationDatabase.cpp clangd/GlobalCom

[PATCH] D34947: [clangd] Add support for per-file extra flags

2017-07-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 105257. krasimir marked 2 inline comments as done. krasimir added a comment. - Addess review comments https://reviews.llvm.org/D34947 Files: clangd/ClangdLSPServer.cpp clangd/ClangdUnitStore.cpp clangd/GlobalCompilationDatabase.cpp clangd/GlobalCom

[PATCH] D34947: [clangd] Add support for per-file extra flags

2017-07-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 105274. krasimir added a comment. - Address review comment https://reviews.llvm.org/D34947 Files: clangd/ClangdLSPServer.cpp clangd/ClangdUnitStore.cpp clangd/GlobalCompilationDatabase.cpp clangd/GlobalCompilationDatabase.h clangd/Protocol.cpp

[PATCH] D35015: [clang-format] Add space between a message field key and the opening bracket in proto messages

2017-07-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch updates the formatting of message fields of type `a{...}` to `a {...}` for proto messages. https://reviews.llvm.org/D35015 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestProto.cpp unittests/For

[PATCH] D34947: [clangd] Add support for per-file extra flags

2017-07-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307241: [clangd] Add support for per-file extra flags (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D34947 Files: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp clang-to

[PATCH] D35015: [clang-format] Add space between a message field key and the opening bracket in proto messages

2017-07-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307261: [clang-format] Add space between a message field key and the opening bracket in… (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35015 Files: cfe/trunk/lib/Format/Token

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This patch prevents getCanonicalDecl returning nullptr in case it finds a canonical TemplateDeclaration with no attached TemplatedDecl. Found by running the indexer over a version of the standard library deep inside a template metaprogramming mess. https://reviews

[PATCH] D34225: [clang-format] Teach clang-format how to handle C++ coroutines

2017-07-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good to me too, but I actually don't know this code. Leaving to Daniel! https://reviews.llvm.org/D34225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D35215: [clangd] Fix Go to Definition not working in VSCode extension

2017-07-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! This is better than my https://reviews.llvm.org/D35238! Repository: rL LLVM https://reviews.llvm.org/D35215 ___ cfe-commits ma

[PATCH] D35238: [clangd] Remove uriConverter workaround in VS code client

2017-07-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. https://reviews.llvm.org/D35215 is an even better solution to this problem! https://reviews.llvm.org/D35238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch fixes bug https://bugs.llvm.org/show_bug.cgi?id=3313: a comment line was aligned with the next #ifdef even in the presence of an empty line between them. https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnota

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106202. krasimir added a comment. - Switch to original column-based detection https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp =

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106205. krasimir added a comment. - Update switch tests https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp =

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106220. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp Index

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307795: [clang-format] Keep level of comment before an empty line (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35296 Files: cfe/trunk/lib/Format/TokenAnnotator.cpp cfe/tru

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I've figured out a test case for this: template class A> class B { typedef A A_int; }; The real-world problem comes from ptr_traits.h . https://reviews.llvm.org/D35212

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @vsk: could you help me turning this into a test case? https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Nice! Comment at: lib/Format/UnwrappedLineParser.cpp:461 + +size_t UnwrappedLineParser::computePPHash() const { + size_t h = 0; @djasper: do you aware of some baked-in hash-combine functionality in llvm which this can use directly? I

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106930. krasimir added a comment. - Add an Index test case https://reviews.llvm.org/D35212 Files: lib/Index/IndexingContext.cpp test/Index/Core/no-templated-canonical-decl.cpp Index: test/Index/Core/no-templated-canonical-decl.cpp ===

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @vsk: thank you! https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308269: [Index] Prevent canonical decl becoming nullptr (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35212 Files: cfe/trunk/lib/Index/IndexingContext.cpp cfe/trunk/test/In

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:489 - nextToken(); // Munch the closing brace. + nextToken(InitialLevel); // Munch the closing brace. djasper wrote: > What happens if you instead change the Line->Level = Initia

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107038. krasimir marked 2 inline comments as done. krasimir added a comment. - Fix formatting https://reviews.llvm.org/D35485 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index: u

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107087. krasimir added a comment. - Remove TODO test case https://reviews.llvm.org/D35485 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.c

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked 2 inline comments as done. krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:489 - nextToken(); // Munch the closing brace. + nextToken(InitialLevel); // Munch the closing brace. djasper wrote: > krasimir wrote:

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107285. krasimir marked 2 inline comments as done. krasimir added a comment. - Manually messed up tests https://reviews.llvm.org/D35485 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdUnit.cpp:167 +std::move(VFS)); + CI->getFrontendOpts().DisableFree = false; + return CI; Why `DisableFree`? Comment at: clangd/ClangdUnit.cpp

[PATCH] D35617: [clangd] Allow specifying -resource-dir

2017-07-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308486: [clangd] Allow specifying -resource-dir (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35617 Files: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp clang-tools-ex

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:489 - nextToken(); // Munch the closing brace. + nextToken(InitialLevel); // Munch the closing brace. djasper wrote: > krasimir wrote: > > djasper wrote: > > > krasimir wrote: >

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107314. krasimir added a comment. - Adapt the fix from comment suggestion https://reviews.llvm.org/D35485 Files: lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:464 + for (const auto &i : PPStack) { +hash_combine(h, i.Kind); +hash_combine(h, i.Line); When I patch this, I get an `UnwrappedLineParser.cpp:457:16 error: implicit instanti

[PATCH] D35683: [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs

2017-07-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107539. krasimir marked 3 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D35683 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Fo

[PATCH] D35683: [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs

2017-07-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked 2 inline comments as done. krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:435 + // Detect a multiline jsdoc comment and set DelimitersOnNewline in that case. + if (Style.Language == FormatStyle::LK_JavaScript) { +if ((Lines[0] == "

[PATCH] D35683: [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs

2017-07-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107593. krasimir marked an inline comment as done. krasimir added a comment. - Add negative tests https://reviews.llvm.org/D35683 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/

[PATCH] D35683: [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs

2017-07-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308684: [clang-format] Put '/**' and '*/' on own lines in multiline jsdocs (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35683 Files: cfe/trunk/lib/Format/BreakableToken.cpp

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @djasper: ping https://reviews.llvm.org/D35485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35682: Fixed failing assert in code completion.

2017-07-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D35682 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:405 +for (; J != E; ++J) { + const AnnotatedLine *Line = J[0]; + if (Line->InPPDirective != InPPDirective) I'd change `J[0]` to `*J` and rename `Line` to s

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308725: [clang-format] Fix comment levels between '}' and PPDirective (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35485 Files: cfe/trunk/lib/Format/UnwrappedLineParser.cpp

[PATCH] D35406: [clangd] Replace ASTUnit with manual AST management.

2017-07-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D35406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D35794: [clang-format] Fix comment levels between '} else {' and PPDirective.

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This fixes a regression exposed by r307795 and https://reviews.llvm.org/rL308725 in which the level of a comment line between '} else {' and a preprocessor directive is incorrectly set as the level of the '} else {' line. For exam

[PATCH] D35794: [clang-format] Fix comment levels between '} else {' and PPDirective.

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107896. krasimir added a comment. - Make the closing brace use the same thing https://reviews.llvm.org/D35794 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestCommen

[PATCH] D35794: [clang-format] Fix comment levels between '} else {' and PPDirective.

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107900. krasimir added a comment. - Switch to relative levels https://reviews.llvm.org/D35794 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index: u

[PATCH] D35794: [clang-format] Fix comment levels between '} else {' and PPDirective.

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107901. krasimir added a comment. - Remove unused import https://reviews.llvm.org/D35794 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index: unitte

[PATCH] D35794: [clang-format] Fix comment levels between '} else {' and PPDirective.

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107904. krasimir added a comment. - Address review comments https://reviews.llvm.org/D35794 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index: uni

[PATCH] D35794: [clang-format] Fix comment levels between '} else {' and PPDirective.

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308882: [clang-format] Fix comment levels between '} else {' and PPDirective. (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35794 Files: cfe/trunk/lib/Format/TokenAnnotator.c

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! Thanks! Please rebase with master before committing since we've been touching the same lines in `UnwrappedLineParser.cpp`. https://reviews.llvm.org/D35483 _

[PATCH] D35825: [clangd] Reuse compile commands during reparse

2017-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Previously we always queried the compilation database and discarded the results if the file was already opened. https://reviews.llvm.org/D35825 Files: clangd/ClangdUnit.cpp clangd/ClangdUnitStore.h Index: clangd/ClangdUnitStore.h ===

[PATCH] D35825: [clangd] Reuse compile commands during reparse

2017-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 108033. krasimir added a comment. - Address review comment https://reviews.llvm.org/D35825 Files: clangd/ClangdUnit.cpp clangd/ClangdUnitStore.h Index: clangd/ClangdUnitStore.h === --- c

[PATCH] D35825: [clangd] Reuse compile commands during reparse

2017-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308970: [clangd] Reuse compile commands during reparse (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35825 Files: clang-tools-extra/trunk/clangd/ClangdUnit.cpp clang-tools-

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! Thanks! https://reviews.llvm.org/D35557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322479: [clang-format] Adds a FormatStyleSet (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D41487?vs=128933&id=129832#toc Repository: rC Clang https://revi

[PATCH] D42098: [clang-format] Reorganize RawStringFormat based on language

2018-01-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: bkramer. Herald added a subscriber: klimek. This patch changes the structure for raw string formatting options by making it language based (enumerate delimiters per language) as opposed to delimiter-based (specify the language for a delimi

[PATCH] D42098: [clang-format] Reorganize RawStringFormat based on language

2018-01-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 129932. krasimir added a comment. - Update comments Repository: rC Clang https://reviews.llvm.org/D42098 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/Format.cpp unittests/Format/FormatTest.cpp unittests/F

[PATCH] D42098: [clang-format] Reorganize RawStringFormat based on language

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322634: [clang-format] Reorganize RawStringFormat based on language (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42098

[PATCH] D42167: [clang-format] adds enclosing function detection to raw string formatting

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. This patch adds enclosing function detection to raw string formatting. Repository: rC Clang https://reviews.llvm.org/D42167 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Co

[PATCH] D42167: [clang-format] adds enclosing function detection to raw string formatting

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130142. krasimir added a comment. - Update comments Repository: rC Clang https://reviews.llvm.org/D42167 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h

[PATCH] D42167: [clang-format] adds enclosing function detection to raw string formatting

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130177. krasimir added a comment. - Format a function Repository: rC Clang https://reviews.llvm.org/D42167 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.

[PATCH] D42167: [clang-format] adds enclosing function detection to raw string formatting

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322678: [clang-format] adds enclosing function detection to raw string formatting (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D42167?vs=130177&id=130191#toc

[PATCH] D42167: [clang-format] adds enclosing function detection to raw string formatting

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322678: [clang-format] adds enclosing function detection to raw string formatting (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llv

[PATCH] D42187: [clang-format] Adds a canonical delimiter to raw string formatting

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. This patch adds canonical delimiter support to the raw string formatting. This allows matching delimiters to be updated to the canonical one. Repository: rC Clang https://reviews.llvm.org/D42187 Files: docs/Clan

[PATCH] D42189: [clang-format] Replace unordered_set with an array

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: bkramer. Herald added subscribers: cfe-commits, klimek. krasimir added subscribers: benhamilton, jolesiak. This replaces an unordered_set from r322690 with an array and binary search. Repository: rC Clang https://reviews.llvm.org/D421

[PATCH] D42189: [clang-format] Replace unordered_set with an array

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130223. krasimir added a comment. - Address review comment Repository: rC Clang https://reviews.llvm.org/D42189 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp === --- lib/For

[PATCH] D42189: [clang-format] Replace unordered_set with an array

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130232. krasimir added a comment. - Add comment Repository: rC Clang https://reviews.llvm.org/D42189 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp === --- lib/Format/Format.

[PATCH] D42189: [clang-format] Replace unordered_set with an array

2018-01-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322749: [clang-format] Replace unordered_set with an array (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42189 Files:

[PATCH] D42036: [clang-format] Keep comments aligned to macros

2018-01-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1710 +enum CommentAlignment { CA_None, CA_Code, CA_Preprocessor }; + Please comment these. Comment at: lib/Format/TokenAnnotator.cpp:1756 + if (Alignment == CA_Pre

[PATCH] D42187: [clang-format] Adds a canonical delimiter to raw string formatting

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130587. krasimir marked an inline comment as done. krasimir added a comment. - Add a comment about std::string Repository: rC Clang https://reviews.llvm.org/D42187 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Co

[PATCH] D42187: [clang-format] Adds a canonical delimiter to raw string formatting

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1336 + unsigned OldSuffixSize = 2 + OldDelimiter.size(); + std::string RawText = + Current.TokenText.substr(OldPrefixSize).drop_back(OldSuffixSize); bkramer wrote: > Can this b

[PATCH] D42298: [clang-format] Fix shortening blocks in macros causing merged next line

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: bkramer. Herald added a subscriber: klimek. This patch addresses bug 36002, where a combination of options causes the line following a short block in macro to be merged with that macro. Repository: rC Clang https://reviews.llvm.org/D4

[PATCH] D42298: [clang-format] Fix shortening blocks in macros causing merged next line

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130604. krasimir added a comment. - Remove added newline Repository: rC Clang https://reviews.llvm.org/D42298 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

[PATCH] D42298: [clang-format] Fix shortening blocks in macros causing merged next line

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130609. krasimir added a comment. - Remove double whitespace Repository: rC Clang https://reviews.llvm.org/D42298 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

[PATCH] D42298: [clang-format] Fix shortening blocks in macros causing merged next line

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322954: [clang-format] Fix shortening blocks in macros causing merged next line (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.

[PATCH] D42187: [clang-format] Adds a canonical delimiter to raw string formatting

2018-01-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322956: [clang-format] Adds a canonical delimiter to raw string formatting (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D42187?vs=130587&id=130626#toc Reposi

[PATCH] D42372: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. This patch fixes an issue where the UnbreakableTailLength would be counted towards the length of a token during breaking, even though we can break after the token. For example, this proto text with column limit 20

[PATCH] D42372: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130885. krasimir added a comment. - Cleanup Repository: rC Clang https://reviews.llvm.org/D42372 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestTextProto.cpp Index

[PATCH] D42372: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 130882. krasimir added a comment. - Cleanup Repository: rC Clang https://reviews.llvm.org/D42372 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestTextProto.cpp Index

[PATCH] D42373: [clang-format] Disable string literal breaking for text protos

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. Commonly string literals in protos are already multiline, so breaking them further is undesirable. Repository: rC Clang https://reviews.llvm.org/D42373 Files: lib/Format/Forma

[PATCH] D42376: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rC Clang https://reviews.llvm.org/D42376 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestTextProto.cpp Index: uni

[PATCH] D42372: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Thanks! I created https://reviews.llvm.org/D42376 which does the same in a much simpler way! Repository: rC Clang https://reviews.llvm.org/D42372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

[PATCH] D42372: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. Superseded by https://reviews.llvm.org/D42376 Repository: rC Clang https://reviews.llvm.org/D42372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D42036: [clang-format] Keep comments aligned to macros

2018-01-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1725 + NextNonComment.Type == LT_ImportStatement) && + NextNonComment.Level > 0 && !Comment.InPPDirective) +return NextNonComment.First->Next && Why are we checking `NextNonC

[PATCH] D42376: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 131012. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D42376 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestText

[PATCH] D42376: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1579 (Text.startswith(Prefix = "_T(\"") && Text.endswith(Postfix = "\")"))) { + unsigned UnbreakableTailLength = (State.NextToken && canBreak(

[PATCH] D42376: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:1579 (Text.startswith(Prefix = "_T(\"") && Text.endswith(Postfix = "\")"))) { + unsigned UnbreakableTailLength = (State.NextToken && canBreak(State)) +

[PATCH] D42376: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 131023. krasimir marked 3 inline comments as done. krasimir added a comment. - Update comment Repository: rC Clang https://reviews.llvm.org/D42376 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp

[PATCH] D42373: [clang-format] Disable string literal breaking for text protos

2018-01-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Let's not do this then. For reflowing string literals, it could take a two-three months. Repository: rC Clang https://reviews.llvm.org/D42373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D42376: [clang-format] Ignore UnbreakableTailLength sometimes during breaking

2018-01-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323188: [clang-format] Ignore UnbreakableTailLength sometimes during breaking (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.or

[PATCH] D42373: [clang-format] Disable string literal breaking for text protos

2018-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. So, we found out other cases where this is especially painful: - breaking long URLs into multiple lines - updating the text of a paragraph and breaking again with combination of no-reflow We could disable it for now and enable it when we have string literal reflow. R

<    3   4   5   6   7   8   9   10   >