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

2018-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 131216. krasimir added a comment. - Update comment Repository: rC Clang https://reviews.llvm.org/D42373 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp === --- lib/Format/Form

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

2018-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323319: [clang-format] Disable string literal breaking for text protos (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D4237

[PATCH] D42500: [clang-format] Fixes indentation of inner text proto messages

2018-01-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added a subscriber: klimek. Consider the text proto: message { sub { key: value } } Previously the first `{` was TT_Unknown, which caused the inner message to be indented by the continuation width. This didn't hap

[PATCH] D42500: [clang-format] Fixes indentation of inner text proto messages

2018-01-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323419: [clang-format] Fixes indentation of inner text proto messages (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D42500

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added inline comments. This revision now requires changes to proceed. Comment at: test/Format/lit.local.cfg:1 +# Suffixes supported by clang-format. +config.suffixes = ['.c', '.cc', '.cpp', '.h', '.m', '.mm', '.java', '.js', -

[PATCH] D42395: [clang-format] Fix bug where -dump-config failed on ObjC header

2018-01-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added inline comments. This revision is now accepted and ready to land. Comment at: test/Format/lit.local.cfg:1 +# Suffixes supported by clang-format. +config.suffixes = ['.c', '.cc', '.cpp', '.h', '.m', '.mm', '.java', '.js', ---

[PATCH] D42651: [clang-format] Disable some text proto delimiters and functions for google style

2018-01-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: sammccall. Herald added subscribers: cfe-commits, klimek. This disables some of the most commonly used text proto delimiters and functions for google style until we resolve several style options for that style. In particular, wheter there

[PATCH] D42651: [clang-format] Disable some text proto delimiters and functions for google style

2018-01-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323678: [clang-format] Disable some text proto delimiters and functions for google style (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://revi

[PATCH] D42408: [clang-format] Align preprocessor comments with #

2018-01-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:2613 Style)); - // FIXME: The comment indent corrector in TokenAnnotator gets thrown off by - // preprocessor indentation. - EXPECT_EQ("#if 1\n" -" // comment\n" -

[PATCH] D42493: [clang-format] Fix ObjC message arguments formatting.

2018-01-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTestObjC.cpp:678 + " a = 42;\n" + "}\n" + "secondBlock:^{\n" Can you put a test with a non-block between two blocks please Repository: rC

[PATCH] D42685: [clang-format] Adds space around braces in text protos

2018-01-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. This patch modifies the text proto Google style to add spaces around braces. I investigated using something different than Cpp11BracedListStyle, but it turns out it's what we want a

[PATCH] D42685: [clang-format] Adds space around braces in text protos

2018-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC323860: [clang-format] Adds space around braces in text protos (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D42685?vs=131947&id=132117#toc Repository: rC C

[PATCH] D42727: [clang-format] Adds space around angle brackets in text protos

2018-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: djasper. Herald added subscribers: cfe-commits, klimek. This patch adds spaces around angle brackets in text proto Google style. Previously these were detected as template openers and closers, which happened to have the expected effect. No

[PATCH] D42727: [clang-format] Adds space around angle brackets in text protos

2018-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 132121. krasimir added a comment. - Remove braces around single statement Repository: rC Clang https://reviews.llvm.org/D42727 Files: lib/Format/ContinuationIndenter.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.cpp unittests/Format/For

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good! Just some comments for the include guard states would be helpful. Comment at: lib/Format/UnwrappedLineParser.h:259 +IG_Rejected, + }; + Please put a short comment explaining each of these states. Repository: rC Cla

[PATCH] D42035: [clang-format] Fixup #include guard indents after parseFile()

2018-02-05 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! Thank you! Comment at: lib/Format/UnwrappedLineParser.cpp:244 PPBranchLevel = -1; - IfNdefCondition = nullptr; - FoundIncludeGuardStart = false; - Inclu

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

2017-02-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/DocumentStore.h:42 /// Delete a document from the store. - void removeDocument(StringRef Uri) { Docs.erase(Uri); } + void removeDocument(StringRef Uri) { Docs.erase(Uri); +for (const auto &Listener : Listeners) -

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

2017-02-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ASTManager.cpp:148 + std::string Error; + I = tooling::CompilationDatabase::autoDetectFromSource(Uri, Error); + return I.get(); Do you have an idea about a proper error handling if Error? Co

[PATCH] D29990: [clangd] Implement format on type

2017-02-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 88703. krasimir edited the summary of this revision. krasimir added a comment. - Address review comments https://reviews.llvm.org/D29990 Files: clangd/ClangDMain.cpp clangd/Protocol.cpp clangd/Protocol.h clangd/ProtocolHandlers.cpp clangd/Protoco

[PATCH] D29990: [clangd] Implement format on type

2017-02-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295304: [clangd] Implement format on type (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29990?vs=88703&id=88708#toc Repository: rL LLVM https://reviews.llvm.org/D29990

[PATCH] D29943: [clang-format] Align block comment decorations

2017-02-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 88713. krasimir added a comment. - Align decorations of block comments spanning two lines https://reviews.llvm.org/D29943 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h unittests/Format/FormatTest.cpp unittests/Format/FormatTestCo

[PATCH] D29943: [clang-format] Align block comment decorations

2017-02-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295312: [clang-format] Align block comment decorations (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29943?vs=88713&id=88714#toc Repository: rL LLVM https://reviews.llvm

[PATCH] D30111: [clang-format] Add a test to check at once all the Mozilla coding style

2017-02-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: test/Format/check-coding-style-mozilla.cpp:10 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +if (true) { What is tested here? Brace styles? Comment at: test/Format/check-coding-sty

[PATCH] D29943: [clang-format] Align block comment decorations

2017-02-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D29943#678618, @sylvestre.ledru wrote: > Maybe this could be added to the release notes? Sounds good! Could you please point me to the release docs? I don't seem to find a clang-format--specific section online. Repository: rL LLVM http

[PATCH] D30111: [clang-format] Add a test to check at once all the Mozilla coding style

2017-02-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: test/Format/check-coding-style-mozilla.cpp:10 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +if (true) { sylvestre.ledru wrote: > krasimir wrote: > > What is tested here? Brace styles? > Yes, do you

[PATCH] D30111: [clang-format] Add a test to check at once all the Mozilla coding style

2017-02-28 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D30111#688379, @sylvestre.ledru wrote: > @krasimir is that ok with you? Thank you for addressing my comments! The descriptions help to see what's supposed to happen. Now another point with this test is that it tests that already Mozilla-va

[PATCH] D30405: [clang-format] Add a new flag FixNamespaceEndComments to FormatStyle

2017-03-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90172. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D30405 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Index/CommentToXML

[PATCH] D30498: [clangd] Add support for FixIts.

2017-03-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ASTManager.cpp:105 + std::string Diagnostics; + decltype(this->FixIts) LocalFixIts; // Temporary storage + for (ASTUnit::stored_diag_iterator D = Unit->stored_diag_begin(), Why not typedef the type of the FixI

[PATCH] D30405: [clang-format] Add a new flag FixNamespaceComments to FormatStyle

2017-03-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296632: [clang-format] Add a new flag FixNamespaceComments to FormatStyle (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D30405?vs=90172&id=90179#toc Repository: rL LLVM h

[PATCH] D30498: [clangd] Add support for FixIts.

2017-03-01 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 Great! https://reviews.llvm.org/D30498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D30528: [clang-format] Use number of unwrapped lines for short namespace

2017-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296736: [clang-format] Use number of unwrapped lines for short namespace (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D30528?vs=90299&id=90302#toc Repository: rL LLVM ht

[PATCH] D30492: [clang-format] Allow all but the first string literal in a sequence to be put on a newline

2017-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90309. krasimir added a comment. - Add missing test cases for commas and handling for Objective-C string literals https://reviews.llvm.org/D30492 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestOb

[PATCH] D30492: [clang-format] Allow all but the first string literal in a sequence to be put on a newline

2017-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90310. krasimir added a comment. - Remove DEBUG statement https://reviews.llvm.org/D30492 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestObjC.cpp =

[PATCH] D30492: [clang-format] Allow all but the first string literal in a sequence to be put on a newline

2017-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90312. krasimir added a comment. - Reformat newly added chunk of code https://reviews.llvm.org/D30492 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestObjC.cpp Index: unittests/Format/FormatTestOb

[PATCH] D30111: [clang-format] Add a test to check at once all the Mozilla coding style

2017-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. My input: Maybe this CL is trying to solve a non-existing problem, as separate issues may be tracked as bugs, fixed, and unittests added for each of them as appropriate, as happens in https://reviews.llvm.org/D30487, which adds an option to break multiple inheritance d

[PATCH] D30532: Add examples to clang-format configuration

2017-03-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I also think that examples for the flags are good. My use case is that while developing/debugging its nice to see a short example for a random flag in the documentation pop-up. https://reviews.llvm.org/D30532 ___ cfe-comm

[PATCH] D30492: [clang-format] Allow all but the first string literal in a sequence to be put on a newline

2017-03-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. This patch is superseded by https://reviews.llvm.org/D30575. https://reviews.llvm.org/D30492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D30659: [clang-format] Make NamespaceEndCommentFixer add at most one comment

2017-03-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. Until now, NamespaceEndCommentFixer was adding missing comments for every run, which results in multiple end comments for: namespace { int i; int j; } #if A int a = 1; #else int a = 2; #endif result befo

[PATCH] D30659: [clang-format] Make NamespaceEndCommentFixer add at most one comment

2017-03-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90715. krasimir added a comment. - Added missing newline https://reviews.llvm.org/D30659 Files: lib/Format/NamespaceEndCommentsFixer.cpp unittests/Format/NamespaceEndCommentsFixerTest.cpp Index: unittests/Format/NamespaceEndCommentsFixerTest.cpp

[PATCH] D30659: [clang-format] Make NamespaceEndCommentFixer add at most one comment

2017-03-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297028: [clang-format] Make NamespaceEndCommentFixer add at most one comment (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D30659?vs=90715&id=90716#toc Repository: rL LLVM

[PATCH] D30688: [clang-format] Support namespaces ending in semicolon

2017-03-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90839. krasimir added a comment. - Remove braces https://reviews.llvm.org/D30688 Files: lib/Format/NamespaceEndCommentsFixer.cpp unittests/Format/NamespaceEndCommentsFixerTest.cpp Index: unittests/Format/NamespaceEndCommentsFixerTest.cpp =

[PATCH] D30688: [clang-format] Support namespaces ending in semicolon

2017-03-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297140: [clang-format] Support namespaces ending in semicolon (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D30688?vs=90839&id=90841#toc Repository: rL LLVM https://revie

[PATCH] D30697: [clang-format] Enable comment reflowing in multiline comments containing pragmas

2017-03-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch enables comment reflowing of lines not matching the comment pragma regex in multiline comments containing comment pragma lines. Previously, these comments were dumped without being reindented to the result. https://r

[PATCH] D30697: [clang-format] Enable comment reflowing in multiline comments containing pragmas

2017-03-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90859. krasimir added a comment. - Fix test comment https://reviews.llvm.org/D30697 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/Form

[PATCH] D30697: [clang-format] Enable comment reflowing in multiline comments containing pragmas

2017-03-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90864. krasimir added a comment. - Make the test example idiomatic https://reviews.llvm.org/D30697 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestJS.cpp Index: unitte

[PATCH] D30697: [clang-format] Enable comment reflowing in multiline comments containing pragmas

2017-03-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297261: [clang-format] Enable comment reflowing in multiline comments containing pragmas (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D30697?vs=90864&id=90984#toc Repositor

[PATCH] D30575: [clang-format] Look at NoLineBreak and NoLineBreakInOperand before breakProtrudingToken

2017-03-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 90999. krasimir added a comment. - Remove empty stack check https://reviews.llvm.org/D30575 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp =

[PATCH] D30575: [clang-format] Look at NoLineBreak and NoLineBreakInOperand before breakProtrudingToken

2017-03-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL297274: [clang-format] Look at NoLineBreak and NoLineBreakInOperand before… (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D30575?vs=90999&id=91000#toc Repository: rL LLVM

[PATCH] D30822: [clang-format] Indent the same amount a sequence of string literals

2017-03-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. this is nonsense https://reviews.llvm.org/D30822 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27211: [clang-format] Implement comment reflowing

2016-12-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Encoding.h:136 + } + while (Left + 1 < Right) { +assert(ComputeWidth(Left) <= Width && "binary search left invariant"); xazax.hun wrote: > Was just skimming through this patch. What is the reason to use

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:471 + WhitespaceManager &Whitespaces) { + if (Tok.is(TT_LineComment)) { +// If this is the first line of a token, inform Whitespace Manager about it. ---

[PATCH] D32298: [clang-format] Turn IncompleteFormat into a string

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 96113. krasimir added a comment. - Address review comments https://reviews.llvm.org/D32298 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp lib/Format/UnwrappedLineFormatter.h test/Format/incomplete

[PATCH] D32298: [clang-format] Turn IncompleteFormat into a string

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 96115. krasimir marked an inline comment as done. krasimir added a comment. - Removed double declaration https://reviews.llvm.org/D32298 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp lib/Format/Unw

[PATCH] D32298: [clang-format] Turn IncompleteFormat into a string

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:845 + if (!Invalid) +os << " This might be due to a syntax error at line " << LineNumber + << "."; djasper wrote: > I wonder whether this might be confusing w

[PATCH] D32298: [clang-format] Turn IncompleteFormat into a string

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 96120. krasimir added a comment. - Introduce a proper abstraction https://reviews.llvm.org/D32298 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp lib/Format/UnwrappedLineFormatter.h test/Format/inc

[PATCH] D32298: [clang-format] Replace IncompleteFormat by a struct with Line

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 96129. krasimir marked 5 inline comments as done. krasimir added a comment. - Changed IncompleteFormat to FormatComplete https://reviews.llvm.org/D32298 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D32298: [clang-format] Replace IncompleteFormat by a struct with Line

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 96131. krasimir added a comment. - Refactor tests https://reviews.llvm.org/D32298 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp lib/Format/UnwrappedLineFormatter.h test/Format/incomplete.cpp to

[PATCH] D32298: [clang-format] Replace IncompleteFormat by a struct with Line

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: include/clang/Format/Format.h:1524 + /// best-effort analysis, and could be imprecise. + unsigned Line = 0; +}; djasper wrote: > Hm. Something we might need to be thinking about here is whether this should > be the l

[PATCH] D32351: [Tooling, libclang] Remove unused CompilationDatabase::MappedSources

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This field is never assigned to and it's only ever read from libclang. This patch removes it and adapts libclang to return constants. https://reviews.llvm.org/D32351 Files: include/clang/Tooling/CompilationDatabase.h tools/l

[PATCH] D32298: [clang-format] Replace IncompleteFormat by a struct with Line

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: include/clang/Format/Format.h:1524 + /// best-effort analysis, and could be imprecise. + unsigned Line = 0; +}; krasimir wrote: > djasper wrote: > > Hm. Something we might need to be thinking about here is whether thi

[PATCH] D32298: [clang-format] Replace IncompleteFormat by a struct with Line

2017-04-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300985: [clang-format] Replace IncompleteFormat by a struct with Line (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D32298?vs=96131&id=96141#toc Repository: rL LLVM https

[PATCH] D31887: [clangd] Add documentation page

2017-05-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! Thank you! https://reviews.llvm.org/D31887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Thank you! A test would be nice. Comment at: lib/Format/UnwrappedLineParser.cpp:432 size_t OpeningLineIndex = - Lines.empty() ? (UnwrappedLine::kInvalidIndex) : (Lines.size() - 1); + CurrentLines->empty() ? (UnwrappedLine::kInvalidIndex) :

[PATCH] D32909: [Tooling] Remove redundant check, NFCi

2017-05-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. The Database check looks redundant. https://reviews.llvm.org/D32909 Files: lib/Tooling/JSONCompilationDatabase.cpp Index: lib/Tooling/JSONCompilationDatabase.cpp ==

[PATCH] D32909: [Tooling] Remove redundant check, NFCi

2017-05-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302236: [Tooling] Remove redundant check, NFCi (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D32909?vs=97952&id=97953#toc Repository: rL LLVM https://reviews.llvm.org/D32

[PATCH] D32351: [Tooling][libclang] Remove unused CompilationDatabase::MappedSources

2017-05-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @klimek: We don't have any clients of this field inside clang. https://reviews.llvm.org/D32351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33047: [ClangD] Refactor clangd into separate components

2017-05-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/CMakeLists.txt:12 ProtocolHandlers.cpp ) nit: we might want to keep these sorted Comment at: clangd/ClangdMain.cpp:41 // dispatching. - DocumentStore Store; - ASTManager AST(Out, S

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdLSPServer.cpp:206 -std::vector ClangdLSPServer::codeComplete(PathRef File, - Position Pos) { - return Server.codeComplete(File, Pos); + // Set up JSONRPCDispatche

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. nit: rename this patch title to start with [clangd] https://reviews.llvm.org/D33201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33201: [ClangD] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdLSPServer.cpp:20 +template +std::string replacementsToEdits(StringRef Code, const T &Replacements) { + // Turn the replacements into the format specified by the Language Server Hm, this is a bit too gener

[PATCH] D32901: [clang-format] Handle trailing comment sections in import statement lines

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

[PATCH] D32351: [Tooling][libclang] Remove unused CompilationDatabase::MappedSources

2017-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @klimek: ping https://reviews.llvm.org/D32351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33201: [clangd] Refactor ProtocolHandlers to decouple them from ClangdLSPServer

2017-05-16 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! Comment at: clangd/ClangdLSPServer.h:33 + /// each instance of ClangdLSPServer. + void run(std::istream &In); ilya-biryukov wrote: > kras

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. OnDiskData.TemporaryFiles is filled only by ASTUnit::addTemporaryFile, which is dead. Also these files are used nowhere in the frontend nor in libclang. https://reviews.llvm.org/D33270 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp Index:

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99263. krasimir added a comment. - Remove unused method from the header file too https://reviews.llvm.org/D33270 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp Index: lib/Frontend/ASTUnit.cpp

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-17 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. I can't think of a test case either. Thanks! https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D33270: [Frontend] Remove unused TemporaryFiles

2017-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303265: [Frontend] Remove unused TemporaryFiles (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33270?vs=99263&id=99306#toc Repository: rL LLVM https://reviews.llvm.org/D3

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 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. Thank you! https://reviews.llvm.org/D33282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:313 + // Numbered lists may also start with a number followed by '.' + static const char *kNumberedListPattern = "^[0-9]+\\. "; + hasSpecialMeaningPrefix = hasSpecialMeaningPrefix || A p

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll commit this. https://reviews.llvm.org/D33282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303330: clang-format: fix prefix for doxygen comments after member (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33282?vs=99307&id=99402#toc Repository: rL LLVM https://

[PATCH] D33238: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99405. krasimir added a comment. - Add comment about import statements. https://reviews.llvm.org/D33238 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineFormatter.cpp Index: lib/Format/UnwrappedLineFormatter.cpp ==

[PATCH] D33238: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303332: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33238?vs=99405&id=99407#toc Repository: rL LLVM ht

[PATCH] D33314: clang-format: Add option to remove semicolon at end of namespace

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I think that this is more of a linter check and as such doesn't really belong to clang-format. @djasper: what do you think about this? https://reviews.llvm.org/D33314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:313 + // Numbered lists may also start with a number followed by '.' + static const char *kNumberedListPattern = "^[0-9]+\\. "; + hasSpecialMeaningPrefix = hasSpecialMeaningPrefix || Typ

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Do you need me to commit this? https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It should be enough for commit access. Mention your patches while requesting commit access. I'll submit this in the meantime. https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303353: [clang-format] Fix MatchingOpeningBlockLineIndex computation (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D32524?vs=99136&id=99442#toc Repository: rL LLVM https:

[PATCH] D33350: [clangd] Switch to incomplete translation units

2017-05-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This speeds up code completion. All the cool kids (ycmd) are doing it. https://reviews.llvm.org/D33350 Files: clangd/ClangdUnit.cpp Index: clangd/ClangdUnit.cpp === --- clangd/ClangdUnit.cpp +++

[PATCH] D33351: [clang-format] Handle trailing comment sections in import statement lines

2017-05-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99538. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D33351 Files: lib/Format/ContinuationIndenter.cpp lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp unitte

[PATCH] D33351: [clang-format] Handle trailing comment sections in import statement lines

2017-05-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303415: [clang-format] Handle trailing comment sections in import statement lines (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33351?vs=99538&id=99539#toc Repository: rL

[PATCH] D33394: [clang-format] Keep trailing preprocessor line comments separate from the following section comments

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. r303415 changed the way a sequence of line comments following a preprocessor macro is handled, which has the unfortunate effect of aligning a trailing preprocessor line comment and following unrelated section comments, so: #ifde

[PATCH] D33394: [clang-format] Keep trailing preprocessor line comments separate from the following section comments

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99729. krasimir marked an inline comment as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D33394 Files: lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestC

[PATCH] D33394: [clang-format] Keep trailing preprocessor line comments separate from the following section comments

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:106 + isLineComment(*Token) && Token->NewlinesBefore == 1 && + Token->OriginalColumn == PreviousToken->OriginalColumn); } -

[PATCH] D33394: [clang-format] Keep trailing preprocessor line comments separate from the following section comments

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99731. krasimir marked an inline comment as done. krasimir added a comment. - Remove parentheses https://reviews.llvm.org/D33394 Files: lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestCommen

[PATCH] D33394: [clang-format] Keep trailing preprocessor line comments separate from the following section comments

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303541: [clang-format] Keep trailing preprocessor line comments separate from the… (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33394?vs=99731&id=99734#toc Repository: r

[PATCH] D33395: [clangd] Split clangd into library+executable (mainly for unit tests).

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/tool/ClangdMain.cpp:11 +#include "../ClangdLSPServer.h" +#include "../JSONRPCDispatcher.h" #include "llvm/Support/CommandLine.h" I'd suggest to not have parent directory includes, but add them to the cmake file

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-22 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 great! https://reviews.llvm.org/D33285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D33350: [clangd] Switch to incomplete translation units

2017-05-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303547: [clangd] Switch to incomplete translation units (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33350?vs=99535&id=99749#toc Repository: rL LLVM https://reviews.llv

[PATCH] D33415: [clangd] Replaced WorkerRequest with std::function...

2017-05-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdServer.cpp:85 +Request = std::move(RequestQueue.front()); +RequestQueue.pop_front(); } // unlock Mutex Why are we taking it from the front and not from the back? Maybe at least add a

<    4   5   6   7   8   9   10   >