[PATCH] D121370: [clang-format] SortIncludes should support "@import" lines in Objective-C

2022-04-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. > @krasimir I'm on sick leave and will have a look as soon as I'm back. Can it > wait that long? I'm planning to revert this temporarily and add a regression test, you can proceed with this work without time pressure. We aim to release a new clang-format version weekl

[PATCH] D124512: Revert "[clang-format] SortIncludes should support "@import" lines in Objective-C"

2022-04-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: All. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit d46fa023caa2db5a9f1e21dd038bcb626261d958

[PATCH] D124513: [clang-format] add a regression test for include sorting

2022-04-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: All. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This adds a regression test from the comments on https://reviews.llvm.org/D121370. Repository: rG LLVM Github Monorepo

[PATCH] D124513: [clang-format] add a regression test for include sorting

2022-04-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 425456. krasimir added a comment. - update with just the last commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124513/new/ https://reviews.llvm.org/D124513 Files: clang/unittests/Format/SortIncludesTest

[PATCH] D124513: [clang-format] add a regression test for include sorting

2022-04-28 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbe656df18721: [clang-format] add a regression test for include sorting (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D121370: [clang-format] SortIncludes should support "@import" lines in Objective-C

2022-05-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D121370#3488401 , @kwk wrote: > @krasimir could you please test this patch on your side? @kwk thank you! the new version of the patch looks good! I didn't know before about the issue you found with the `/* a comment before *

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-07-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Appears that this regressed examples like this: // before int i = int{16} * 1024; // after int i = int{16}* 1024; Naively it looks like in all added examples, the token preceding the matching `{` of the `}` is one of `struct`, `class`, `union`, `enum`, or a `>`

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-07-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D127873#3651364 , @jackhong12 wrote: > I think we cannot identify `struct`, `union`, `class` or `enum` by the right > bracket. Clang-format will split the input into multiple lines. For instance > `struct Tmp {} *tmp;` will

[PATCH] D129771: [clang-format] distinguish multiplication after brace-init from pointer

2022-07-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: All. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. After https://github.com/llvm/llvm-project/commit/b646f0955574c6ad4c156c9db522e46f597cfda9, the added regression test star

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-07-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Proposed https://reviews.llvm.org/D129771. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127873/new/ https://reviews.llvm.org/D127873 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D129771: [clang-format] distinguish multiplication after brace-init from pointer

2022-07-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 444921. krasimir added a comment. - address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129771/new/ https://reviews.llvm.org/D129771 Files: clang/lib/Format/TokenAnnotator.cpp clang/unit

[PATCH] D129771: [clang-format] distinguish multiplication after brace-init from pointer

2022-07-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added a comment. In D129771#3653830 , @jackhong12 wrote: > I think we can also add new test cases in > `clang/unittests/Format/TokenAnnotatorTest.cpp`. > > Tokens = annotate("int i = int{42} * 34;");

[PATCH] D129771: [clang-format] distinguish multiplication after brace-init from pointer

2022-07-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8dd2ef213085: [clang-format] distinguish multiplication after brace-init from pointer (authored by krasimir). Repository: rG LLVM Github Monorepo

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-16 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It looks like this regressed the following example by adding an unwanted level of indentation to the `#elif B` branch: % ./clang-format --version clang-format version 15.0.0 (https://github.com/llvm/llvm-project.git 50cd52d9357224cce66a9e00c9a0417c658a5655) % cat

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. We found another regression with this in wrongly indenting/not putting on its own line ObjC `@interface`: % ./clang-format --version clang-format version 15.0.0 (https://github.com/llvm/llvm-project.git 50cd52d9357224cce66a9e00c9a0417c658a5655) % cat t

[PATCH] D66653: [clang-format] Turn include regrouping on for Google ObjC style

2019-08-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Turns back include regrouping for Google ObjC style Repository: rC Clang https://reviews.llvm.org/D66653 Files: lib/Format/Format.cpp unittests/Format/SortIncludesTest.cpp Index: unit

[PATCH] D35986: [clangd] Add ':' to completion trigger characters.

2017-07-30 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/D35986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D36143: [clang-format] Fix indent of 'key <...>' in text protos

2017-08-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch fixes the indentation of the code pattern `key <...>` in text protos. Previously, such line would be alinged depending on the column of the previous colon, which usually indents too much. https://reviews.llvm.org/D3614

[PATCH] D36149: [Tooling] Add LLVM_NODISCARD to Replacements::merge

2017-08-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch adds LLVM_NODISCARD to Replacements::merge. I've hit this several times already. https://reviews.llvm.org/D36149 Files: include/clang/Tooling/Core/Replacement.h Index: include/clang/Tooling/Core/Replacement.h

[PATCH] D36149: [Tooling] Add LLVM_NODISCARD to Replacements::merge

2017-08-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309689: [Tooling] Add LLVM_NODISCARD to Replacements::merge (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D36149 Files: cfe/trunk/include/clang/Tooling/Core/Replacement.h In

[PATCH] D36143: [clang-format] Fix indent of 'key <...>' in text protos

2017-08-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 109322. krasimir added a comment. - Fix similar issue for 'key {...}' https://reviews.llvm.org/D36143 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestProto.cpp unittests/Format/FormatTestTextProto.cpp Index: unittests/Format/F

[PATCH] D36217: Fix parsing of <>-style proto options

2017-08-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This patch fixes the parsing of proto option fields like `option op = <...>`. Previously the parser did not enter the right code path inside the angle braces, causing the contents to be split into several unwrapped lines inside. https://reviews.llvm.org/D36217 Fi

[PATCH] D36261: [clangd] Use multiple working threads in clangd.

2017-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Great! Comment at: clangd/ClangdServer.h:131 + /// Handles running WorkerRequests of ClangdServer on a separate threads. /// Currently runs only one worker thread. typo: "on separate threads" Comment at: clangd/Cla

[PATCH] D36217: [clang-format] Fix parsing of <>-style proto options

2017-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309937: [clang-format] Fix parsing of <>-style proto options (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D36217 Files: cfe/trunk/lib/Format/UnwrappedLineParser.cpp cfe/tru

[PATCH] D35847: clang-format: Fix left pointer alignment after delctype/typeof

2017-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2206 +return (Left.is(tok::r_paren) && Line.MightBeFunctionDecl && +!(Left.MatchingParen && Left.MatchingParen->Previous && + Left.MatchingParen->Previous->isOneOf(tok::kw_typeo

[PATCH] D36143: [clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos

2017-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 109551. krasimir added a comment. - Rebase with master https://reviews.llvm.org/D36143 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestProto.cpp unittests/Format/FormatTestTextProto.cpp Index: unittests/Format/FormatTestTextPr

[PATCH] D36143: [clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos

2017-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309941: [clang-format] Fix indent of 'key <...>' and 'key {...}' in text protos (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D36143 Files: cfe/trunk/lib/Format/ContinuationIn

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: include/clang/CrossTU/CrossTUDiagnostic.h:16 +namespace clang { + namespace diag { +enum { LLVM Style uses no indent for namespaces. Reformat with `clang-format`. Comment at: include/clang/CrossT

[PATCH] D35847: clang-format: Fix left pointer alignment after delctype/typeof

2017-08-04 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1402 +PrevToken->MatchingParen->getPreviousNonComment() && +PrevToken->MatchingParen->getPreviousNonComment()->isOneOf( + tok::kw_typeof, It would be cool if you ex

[PATCH] D35847: clang-format: Fix left pointer alignment after delctype/typeof

2017-08-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! Please reformat the newly added code blocks with `clang-format` before submitting. Comment at: lib/Format/TokenAnnotator.cpp:1402 + FormatToken *TokenBe

[PATCH] D36359: [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas

2017-08-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This handles a case where the trailing '*/' of a multiline jsdoc eding in a comment pragma wouldn't be put on a new line. https://reviews.llvm.org/D36359 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h li

[PATCH] D36359: [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas

2017-08-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 110156. krasimir added a comment. - Simplify getSplitAfterLastLine https://reviews.llvm.org/D36359 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestJS.cpp Index: unitte

[PATCH] D36359: [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas

2017-08-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 110157. krasimir added a comment. - Remove debugging https://reviews.llvm.org/D36359 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/For

[PATCH] D36359: [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment pragmas

2017-08-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310458: [clang-format] Put '/**' and '*/' on own lines in jsdocs ending in comment… (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D36359 Files: cfe/trunk/lib/Format/BreakableT

[PATCH] D36614: [clang-format] Refine trailing comment detection

2017-08-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch fixes an non-idempotency issue connected with detection of trailing comments. Consider formatting the following code with column limit at `V`: V const /* comment comment */ A = B; The comment is

[PATCH] D35847: clang-format: Fix left pointer alignment after delctype/typeof

2017-08-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310831: clang-format: Fix left pointer alignment after delctype/typeof (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D35847?vs=110032&id=110938#toc Repository: rL LLVM ht

[PATCH] D36614: [clang-format] Refine trailing comment detection

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

[PATCH] D36956: [clang-format] Emit absolute splits before lines for comments

2017-08-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch makes the splits emitted for the beginning of comment lines during reformatting absolute. Previously, they were relative to the start of the non-whitespace content of the line, which messes up further TailOffset calculat

[PATCH] D36956: [clang-format] Emit absolute splits before lines for comments

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 112147. krasimir marked 3 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D36956 Files: lib/Format/BreakableToken.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComm

[PATCH] D36614: [clang-format] Refine trailing comment detection

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: lib/Format/FormatToken.h:397 + (!Previous || + Previous->isOneOf(tok::comma, tok::equal, tok::l_brace) || + Next->is(tok::r_brace; dja

[PATCH] D37011: [clang-format] Fix lines regression in clang-format.py

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This patch fixes a regression after https://reviews.llvm.org/rL305665, which updates the structure of the `lines` variable. https://reviews.llvm.org/D37011 Files: tools/clang-format/clang-format.py Index: tools/clang-format/clang-format.py ===

[PATCH] D37011: [clang-format] Fix lines regression in clang-format.py

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311456: [clang-format] Fix lines regression in clang-format.py (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D37011 Files: cfe/trunk/tools/clang-format/clang-format.py Index

[PATCH] D37007: [clang-format] Break non-trailing block comments

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311457: [clang-format] Break non-trailing block comments (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D37007 Files: cfe/trunk/lib/Format/ContinuationIndenter.cpp cfe/trunk/

[PATCH] D36614: [clang-format] Refine trailing comment detection

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir marked an inline comment as done. krasimir added a comment. This was superseded by https://reviews.llvm.org/D37007. https://reviews.llvm.org/D36614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-22 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:383 + State.Line->Type == LT_ImportStatement) && + Current.Previous->is(tok::hash) && State.FirstIndent > 0) { +Spaces += State.FirstIndent; You can replace `Current.Pr

[PATCH] D36956: [clang-format] Emit absolute splits before lines for comments

2017-08-23 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311559: [clang-format] Emit absolute splits before lines for comments (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D36956?vs=112147&id=112372#toc Repository: rL LLVM htt

[PATCH] D37109: [clang-format] Emit absolute splits before lines for comments, try 2

2017-08-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This recommits https://reviews.llvm.org/D36956 with an update to the added test case to not use raw string literals, since this makes gcc unhappy. https://reviews.llvm.org/D37109 Files: lib/Format/BreakableToken.cpp unittest

[PATCH] D37109: [clang-format] Emit absolute splits before lines for comments, try 2

2017-08-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @djasper: No. The test case is a special constellation. https://reviews.llvm.org/D37109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35012: [refactor] Add the AST source selection component

2017-08-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. The test `CursorAtStartOfFunction` is segfaulting. Repository: rL LLVM https://reviews.llvm.org/D35012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35955: clang-format: Add preprocessor directive indentation

2017-08-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Thank you! I understand this patch better now. Looks good from my side! https://reviews.llvm.org/D35955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37109: [clang-format] Emit absolute splits before lines for comments, try 2

2017-08-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311672: [clang-format] Emit absolute splits before lines for comments, try 2 (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D37109 Files: cfe/trunk/lib/Format/BreakableToken.cp

[PATCH] D37136: [clang-format] Do not format likely xml

2017-08-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch detects the leading '<' in likely xml files and stops formatting in that case. A recent use of a Qt xml file with a .ts extension triggered this: http://doc.qt.io/qt-4.8/linguist-ts-file-format.html https://reviews.llv

[PATCH] D72144: Treat C# `using` as a control statement

2020-01-11 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: clang/unittests/Format/FormatTestCSharp.cpp:257 + "}", + Style); + Please also add a test for `SBPO

[PATCH] D72401: Fixes for spaces around C# object initializers

2020-01-11 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: clang/lib/Format/TokenAnnotator.cpp:2869 +// space before '{' in "new MyType {" +if (Left.is(TT_Unknown) && Right.is(tok::l_brace) && Le

[PATCH] D72401: Fixes for spaces around C# object initializers

2020-01-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:379 + FormatStyle Style = getGoogleStyle(FormatStyle::LK_CSharp); + Style.SpaceBeforeParens = FormatStyle::SBPO_Always; + Is this needed for the formatting below? I find it

[PATCH] D72401: Fixes for spaces around C# object initializers

2020-01-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2869 +// space before '{' in "new MyType {" +if (Left.is(TT_Unknown) && Right.is(tok::l_brace) && Left.Previous && +Left.Previous->is(tok::kw_new)) krasimir wrote: > T

[PATCH] D67843: [clang-format] DisableFormat also now disables SortIncludes

2020-01-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I also am worried that this makes it impossible to just sort includes. Alternatively, we could update the documentation of the `DisableFormat` option to mention this quirk: https://github.com/llvm/llvm-project/blob/master/clang/include/clang/Format/Format.h#L1231 It's n

[PATCH] D92922: [clang-format] PR42434 Remove preprocessor and pragma lines from ObjectiveC guess

2020-12-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This is very nice :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92922/new/ https://reviews.llvm.org/D92922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D90908: [clang-format] do not break before { in JS comments

2020-11-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. krasimir requested review of this revision. In JavaScript some @tags can be followed by `{`, and machinery that parses these comments will fail to understand the comment if followed by a line bre

[PATCH] D90908: [clang-format] do not break before { in JS comments

2020-11-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 303354. krasimir added a comment. update test case range Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90908/new/ https://reviews.llvm.org/D90908 Files: clang/unittests/Format/FormatTestJS.cpp Index: clan

[PATCH] D90908: [clang-format] do not break before { in JS comments

2020-11-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 303355. krasimir added a comment. collect commits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90908/new/ https://reviews.llvm.org/D90908 Files: clang/lib/Format/BreakableToken.cpp clang/unittests/Format

[PATCH] D90908: [clang-format] do not break before { in JS comments

2020-11-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2dbcbd357d1d: [clang-format] do not break before { in JS comments (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D90949: [clang-format] avoid introducing multiline comments

2020-11-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. krasimir requested review of this revision. In C++ with -Werror=comment, multiline comments are not allowed. clang-format could accidentally introduce multiline comments when reflowing. This adap

[PATCH] D90949: [clang-format] avoid introducing multiline comments

2020-11-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 303788. krasimir marked 3 inline comments as done. krasimir added a comment. - address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90949/new/ https://reviews.llvm.org/D90949 Files: clang/l

[PATCH] D90949: [clang-format] avoid introducing multiline comments

2020-11-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/BreakableToken.cpp:109 +// after '\'. +if (Style.isCpp()) { + StringRef::size_type LastNonBlank = sammccall wrote: > Do we really want to predicate this on isCpp()? `//` comments are allowe

[PATCH] D90949: [clang-format] avoid introducing multiline comments

2020-11-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7b7170fa5791: [clang-format] avoid introducing multiline comments (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D91078: [clang-format] do not break before @tags in JS comments

2020-11-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. krasimir requested review of this revision. In JavaScript breaking before a `@tag` in a comment puts it on a new line, and machinery that parses these comments will fail to understand such commen

[PATCH] D91078: [clang-format] do not break before @tags in JS comments

2020-11-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/unittests/Format/FormatTestJS.cpp:194 -format("/** @returns {string} jsdoc line 12 */", - getGoogleJSStyleWithColumns(20))); EXPECT_EQ("/**\n" this actually demonstrates a bug fixe

[PATCH] D91078: [clang-format] do not break before @tags in JS comments

2020-11-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG77b484116971: [clang-format] do not break before @tags in JS comments (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2020-12-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2727 + + * ``unsigned Maximum`` The maximum number of spaces at the start of the comment. + HazardyKnusperkeks wrote: > MyDeveloperDay wrote: > > I'm personally not a massive fan

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2020-10-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. This looks reasonable. I'm curious about DiagnosticsEngine: previously we were using the defaults for `client` and `ShouldOwnClient` ctor params (`nullptr` and `true`). If this usage leads to crashes, isn't the issue in `DiagnosticsEngine` itself? Repository: rG LL

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2020-10-27 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. Thank you! Your fix looks good for clang-format. I'm also not familiar with `DiagnosticsEngine`. It would be nice to follow-up with folks on that on either removing the defaulted ctor para

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2020-10-28 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D90121#2358730 , @dmikis wrote: > @krasimir What would our next steps be to get this change into LLVM source > tree? JIC, I don't have commit rights :) I'll commit this for you. If you're planning to commit regularly, and aft

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2020-10-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGdf00267f1fdb: clang-format: Add a consumer to diagnostics engine (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2020-10-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D90121#2361985 , @thakis wrote: > This doe snot lgtm. clang-format should not depend on clangFrontend, see the > lengthy discussion in https://reviews.llvm.org/D68554 . Let's try to find > another fix here (and include a test

[PATCH] D92257: [clang-format] Add option to control the space at the front of a line comment

2021-01-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/unittests/Format/FormatTestComments.cpp:3141-3147 "# commen3\n" "# commen4\n" "a: 1 # commen5\n" " # commen6\n" " # commen7", format(

[PATCH] D110432: [clang-format][docs] mark new clang-format configuration options based on which version they would GA

2021-09-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I like this. Consider only displaying the major version (e.g., `clang-format 14` instead of `clang-format 14.0.0`). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110432/new/ https://reviews.llvm.org/D110432 _

[PATCH] D104209: [clang-format] distinguish function type casts after 21c18d5a04316891110cecc2bf37ce51533decba

2021-06-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. https://github.com/llvm/llvm-project/commit/21c18d5a04316891110cecc2bf37ce51533decba improved the detection of multiplication in function all argument

[PATCH] D104209: [clang-format] distinguish function type casts after 21c18d5a04316891110cecc2bf37ce51533decba

2021-06-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG54bd95cd96bc: [clang-format] distinguish function type casts after… (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104209/new/ https:

[PATCH] D107267: [clang-format] don't break between function and function name in JS

2021-08-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The commit https://github.com/llvm/llvm-project/commit/58494c856a15f5b0e886c7baf5d505ac6c05dfe5 updated detection of function declaration names. It had

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. https://reviews.llvm.org/D105964 updated the detection of function definitions. It had the unfortunate effect to start marking object definitions with

[PATCH] D107267: [clang-format] don't break between function and function name in JS

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f4f2783056f: [clang-format] don't break between function and function name in JS (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10726

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 363669. krasimir added a comment. - apply review suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107269/new/ https://reviews.llvm.org/D107269 Files: clang/lib/Format/TokenAnnotator.cpp clang/unit

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2485-2486 if (Next->Next && Next->Next->is(tok::identifier) && - !(Next->MatchingParen->Next && Next->MatchingParen->Next->is(tok::semi))) + (!Next->MatchingParen->Next || + Next->M

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf6bc614546e1: [clan-format] detect function definitions more conservatively (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107269/new/

[PATCH] D107907: [clang-format] handle trailing comments in function definition detection

2021-08-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A follow-up to https://github.com/llvm/llvm-project/commit/f6bc614546e169bb1b17a29c422ebace038e6c62 where we handle the case where the semicolon is fol

[PATCH] D107907: [clang-format] handle trailing comments in function definition detection

2021-08-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 365918. krasimir added a comment. - apply reviewer suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107907/new/ https://reviews.llvm.org/D107907 Files: clang/lib/Format/TokenAnnotator.cpp clang/un

[PATCH] D107907: [clang-format] handle trailing comments in function definition detection

2021-08-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0fc27ef19670: [clang-format] handle trailing comments in function definition detection (authored by krasimir). Repository: rG LLVM Github Monorepo

[PATCH] D107950: [clang-format] improve distinction of K&R function definitions vs attributes

2021-08-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. After https://github.com/llvm/llvm-project/commit/9da70ab3d43c79116f80fc06aa7cf517374ce42c we saw a few regressions around trailing attribute definitio

[PATCH] D107950: [clang-format] improve distinction of K&R function definitions vs attributes

2021-08-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG45934922fa88: [clang-format] improve distinction of K&R function definitions vs attributes (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D103615: [Clang] Add option to handle behaviour of vector bool/vector pixel.

2021-07-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'm unfamiliar with the altivec API. What's a reasonable source code update that preserves the current default behavior `-altivec-src-compat=mixed` under `-altivec-src-compat=xl`, i.e., under `-altivec-src-compat=xl` how would we compare vector bool or vector pixel to

[PATCH] D103615: [Clang] Add option to handle behaviour of vector bool/vector pixel.

2021-07-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D103615#2858433 , @bmahjour wrote: > In D103615#2852430 , @krasimir > wrote: > >> I'm unfamiliar with the altivec API. What's a reasonable source code update >> that preserves the cu

[PATCH] D97688: clang-format: use `ph` as a canonical raw string delimiter for google style

2021-03-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97688 Files: clang/lib/Format/Format.cpp Index: clang/lib/Format/Format.cpp =

[PATCH] D97688: clang-format: use `ph` as a canonical raw string delimiter for google style

2021-03-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 327120. krasimir added a comment. clang-format: use `pb` as a canonical raw string delimiter for google style Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97688/new/ https://reviews.llvm.org/D97688 Files:

[PATCH] D97688: clang-format: use `pb` as a canonical raw string delimiter for google style

2021-03-04 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 328079. krasimir added a comment. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97688/new/ https://reviews.llvm.org/D97688 Files: clang/unittests/Format/FormatTestRawStrings.cpp Index: clang/

[PATCH] D97688: clang-format: use `pb` as a canonical raw string delimiter for google style

2021-03-04 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 328081. krasimir added a comment. Collect commits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97688/new/ https://reviews.llvm.org/D97688 Files: clang/lib/Format/ContinuationIndenter.cpp clang/lib/Format

[PATCH] D98032: [clang-format] Improve clang-format-diff.py error message

2021-03-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. LGTM. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98032/new/ https://reviews.llvm.org/D98032

[PATCH] D97688: clang-format: use `pb` as a canonical raw string delimiter for google style

2021-03-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D97688#2610657 , @sammccall wrote: >> Also fixes a bug where the canonical delimiter was not applied for raw >> strings with empty delimiters detected via well-known enclosing functions >> that expect a text proto. > > Are yo

[PATCH] D97688: clang-format: use `pb` as a canonical raw string delimiter for google style

2021-03-09 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG587859d977e8: clang-format: use `pb` as a canonical raw string delimiter for google style (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D140956: [clang-format] Add an option for breaking after C++11 attributes

2023-01-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It looks like this regressed the following example: % cat test.cc # formatted with older clang-format a &cc() { return 1; } % clang-format --version clang-format version 16.0.0 (https://gith

<    1   2   3   4   5   6   7   8   9   10   >