[PATCH] D60263: [clang-format] Preserve include blocks in ObjC Google style

2019-04-04 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357695: [clang-format] Preserve include blocks in ObjC Google style (authored by krasimir, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHA

[PATCH] D59087: [clang-format] [PR25010] AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I believe there is no such thing as an "short else statement". The `else` is part of the `if` statement and if it is present, I don't consider the whole `if` statement short. As such, IMO the bug is invalid. Repository: rL LLVM CHANGES SINCE LAST ACTION https://r

[PATCH] D59408: [clang-format] [PR25010] Extend AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Generally I'm against introducing new style flags or flag options unless a supported style requires it. IMO this increases maintenance burden and can quickly lead to a big space of style flags that contain tricky incompatibilities. CHANGES SINCE LAST ACTION https://

[PATCH] D59408: [clang-format] [PR25010] Extend AllowShortIfStatementsOnASingleLine not working if an "else" statement is present

2019-04-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:411 * ``SIS_Always`` (in configuration: ``Always``) -Allow short if statements even if the else is a compound statement. +Allow short if/else if/else statements when they are not compoun

[PATCH] D52527: [clang-format] fix Bug 38686: add AfterCaseLabel to BraceWrapping

2019-04-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: include/clang/Format/Format.h:638 +/// \endcode +bool AfterCaseLabel; /// Wrap class definitions. This comment seems outdated (the one in `ClangFormatStyleOptions.rst` seems more recent). The `ClangFormat

[PATCH] D60558: [clang-format] Fix indent of trailing raw string param after newline

2019-04-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently clang-format uses ContinuationIndent to indent the contents of a raw string literal that is the last parameter of the function call. This is to achieve formatting similar to trailing:

[PATCH] D60541: [clang-format] Use SpacesBeforeTrailingComments for "option" directive

2019-04-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. Thank you! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60541/new/ https://reviews.llvm.org/D60541 ___ cfe-

[PATCH] D60541: [clang-format] Use SpacesBeforeTrailingComments for "option" directive

2019-04-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll merge this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60541/new/ https://reviews.llvm.org/D60541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D60541: [clang-format] Use SpacesBeforeTrailingComments for "option" directive

2019-04-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358275: [clang-format] Use SpacesBeforeTrailingComments for "option" directive (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D60541?vs=194595&id=194834#toc Re

[PATCH] D60558: [clang-format] Fix indent of trailing raw string param after newline

2019-04-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC358689: [clang-format] Fix indent of trailing raw string param after newline (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D60558?vs=194654&id=195772#toc Repo

[PATCH] D50147: clang-format: support external styles

2018-09-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I don't understand the use-case this patch is realizing. Suppose I have a bunch of projects that have to share a format style. Then I can checkout them under a common root directory and put an appropriate .clang-format file there. Repository: rC Clang https://revie

[PATCH] D52448: [clang-format] Break before next parameter after a formatted multiline raw string parameter

2018-09-24 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: cfe-commits. TODO: in progress Repository: rC Clang https://reviews.llvm.org/D52448 Files: lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h unittests/Format/FormatTestRawStrings.cpp Index: unittests/Format

[PATCH] D52536: clang-format: [JS] conditional types.

2018-09-26 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: unittests/Format/FormatTestJS.cpp:2315 + " never) extends((k: infer I) => void) ? I " + ": never;"); +} --

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-09-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D52676#1249828, @oleg.smolsky wrote: > In https://reviews.llvm.org/D52676#1249784, @krasimir wrote: > > > IMO `BinPackArguments==false` does not imply that there should be a line > > break before the first arguments, only that there should no

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D52676#1250124, @oleg.smolsky wrote: > In https://reviews.llvm.org/D52676#1250071, @krasimir wrote: > > > In https://reviews.llvm.org/D52676#1249828, @oleg.smolsky wrote: > > > > > In https://reviews.llvm.org/D52676#1249784, @krasimir wrote: >

[PATCH] D52448: [clang-format] Break before next parameter after a formatted multiline raw string parameter

2018-10-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 167749. krasimir added a comment. - Add more tests and tidy-up Repository: rC Clang https://reviews.llvm.org/D52448 Files: lib/Format/ContinuationIndenter.cpp unittests/Format/FormatTestRawStrings.cpp Index: unittests/Format/FormatTestRawStrings.cp

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Digging a bit further, seems like the behavior you're looking for could be achieved by setting the `AlignAfterOpenBracket` option to `DontAlign` or `AlwaysBreak`: % clang-format -style='{BasedOnStyle: google, AlignAfterOpenBracket: AlwaysBreak}' test.cc void f() {

[PATCH] D52800: Java import sorting in clang-format

2018-10-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Format.cpp:848 ChromiumStyle.IndentWidth = 4; +ChromiumStyle.JavaImportGroups = { +"android", It would be helpful to link to a style guide reference for this. Comment at: l

[PATCH] D52800: Java import sorting in clang-format

2018-10-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Another example: we have to be careful with something like this as we don't want to break correct code: import x; import a.loong. c; import y; Comment at: unittests/Format/SortImportsTestJava.cpp:130 + "// that do\n" +

[PATCH] D52800: Java import sorting in clang-format

2018-10-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Format.cpp:1823 + unsigned LongestMatchLength = 0; + for (unsigned i = 0; i < Style.JavaImportGroups.size(); i++) { +std::string GroupPrefix = Style.JavaImportGroups[i]; nit: LLVM Style uses CamelCase f

[PATCH] D52800: Java import sorting in clang-format

2018-10-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. This gooks great! Thanks for the contribution! If you don't have commit access to Clang I can commit this for you. Repository: rC Clang https://reviews.llvm.org/D52800 __

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll take a look. I'm a bit worried that this might potentially affect C++ files too: I'll run an experiment over some random files to confirm that we're not missing something. https://reviews.llvm.org/D52842 ___ cfe-comm

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D52676#1251391, @oleg.smolsky wrote: > In https://reviews.llvm.org/D52676#1251342, @krasimir wrote: > > > Digging a bit further, seems like the behavior you're looking for could be > > achieved by setting the `AlignAfterOpenBracket` option to

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2559 // A.>>DoSomething(); +// A::>>DoSomething(); return false; nit: please add a comment that this example comes from Java. https://reviews.llvm.org/D52842

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good! I didn't find any instances where this messes-up C++ code (and it looks fine to me for Java code). https://reviews.llvm.org/D52842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D57604: [clang-format] Fix breaking of qualified operator

2019-02-04 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC353033: [clang-format] Fix breaking of qualified operator (authored by krasimir, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D57604?vs=18479

[PATCH] D57732: Correct inf typo

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

[PATCH] D58436: [clang-format] Do not emit replacements if Java imports are OK

2019-02-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. Currently clang-format would always emit a replacement for a block of Java imports even if it is correctly formatted: % cat /tmp/Aggregator.java import X; % clang-format /tmp/Ag

[PATCH] D58436: [clang-format] Do not emit replacements if Java imports are OK

2019-02-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354452: [clang-format] Do not emit replacements if Java imports are OK (authored by krasimir, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D37143: [clang-format] Fixed missing enter before bracket in typedef enum and extern

2017-08-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. These look like they could be two separate patches: I like the `typedef enum` part, not convinced about the `extern` part. Also, please add unit tests. https://reviews.llvm.org/D37143 ___ cfe-commits mailing list cfe-commi

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

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @euhlmann: are you planning to commit this? 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] D37143: [clang-format] Fixed missing enter before bracket in typedef enum and extern

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Thank you! I prefer this patch to be split in two. I am still not convinced about the `extern` part: some clients might prefer the other style. https://reviews.llvm.org/D37143 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D37143: [clang-format] Fixed typedef enum brace wrapping

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311998: [clang-format] Fixed typedef enum brace wrapping (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D37143?vs=113062&id=113081#toc Repository: rL LLVM https://reviews.

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

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 113085. krasimir marked 3 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D37136 Files: lib/Format/Format.cpp unittests/Format/FormatTest.cpp unittests/Format/SortIncludesTest.cpp Index: unittes

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

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311999: [clang-format] Do not format likely xml (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D37136?vs=113085&id=113087#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D37263: [clang-format] Ignore case when sorting using-declarations

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. This ignores case while sorting using-declarations, fixing the wierd case in the last test case added. https://reviews.llvm.org/D37263 Files: lib/Format/UsingDeclarationsSorter.cpp unittests/Format/UsingDeclarationsSorterTest.cpp Index: unittests/Format/Usi

[PATCH] D37263: [clang-format] Ignore case when sorting using-declarations

2017-08-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 113092. krasimir added a comment. - Actually add a test https://reviews.llvm.org/D37263 Files: lib/Format/UsingDeclarationsSorter.cpp unittests/Format/UsingDeclarationsSorterTest.cpp Index: unittests/Format/UsingDeclarationsSorterTest.cpp ===

[PATCH] D37150: [clangd] Command line arg to specify compile_commands.json path

2017-08-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/GlobalCompilationDatabase.cpp:89 + // if --compileCommands arg was invoked, check value and override default path + std::size_t found = CompileCommands.find_first_of("/"); + std::string TempString = CompileCommands; -

[PATCH] D37101: [clangd] [WIP] Add support for snippet completions

2017-08-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clangd/ClangdUnit.cpp:302 unsigned NumResults) override { -for (unsigned I = 0; I != NumResults; ++I) { - CodeCompletionResult &Result = Results[I]; - CodeCompletionString *CCS = Result.C

[PATCH] D37140: [clang-format] Fixed one-line if statement

2017-08-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:286 } +if (TheLine->Last->is(tok::l_brace) && +TheLine->First != TheLine->Last && No tests fail if this `if` statement gets removed. Please either remove it or add

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

2017-08-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll land this for you, as discussed offline. The best thing is to apply for commit rights after you have a few patches landed. https://reviews.llvm.org/D35955 ___

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

2017-08-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312125: clang-format: Add preprocessor directive indentation (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D35955?vs=112432&id=113261#toc Repository: rL LLVM https://revi

[PATCH] D37101: [clangd] Add support for snippet completions

2017-09-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. Great! https://reviews.llvm.org/D37101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37263: [clang-format] Ignore case when sorting using-declarations

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

[PATCH] D37140: [clang-format] Fixed one-line if statement

2017-09-08 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. Great! Would you like me to commit this for you? https://reviews.llvm.org/D37140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D37140: [clang-format] Fixed one-line if statement

2017-09-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312904: [clang-format] Fixed one-line if statement (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D37140?vs=113979&id=114558#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D37695: [clang-format] Break non-trailing comments, try 2

2017-09-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch enables `BreakableToken` to manage the formatting of non-trailing block comments. It is a refinement of https://reviews.llvm.org/D37007. We discovered that the optimizer outsmarts us on cases where breaking the comment

[PATCH] D37695: [clang-format] Break non-trailing comments, try 2

2017-09-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 114617. krasimir added a comment. - Add the original test cases https://reviews.llvm.org/D37695 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h unittests/Forma

[PATCH] D37260: [clang-format] Fixed extern C brace wrapping

2017-09-11 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Yes, I meant that it should at least be controlled by a flag. However, adding flags to clang-format requires careful consideration, we usually would accept options that are necessary for commonly used styles with style guides and with a community willing to support the

[PATCH] D33440: clang-format: better handle statement and namespace macros

2017-09-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Patch looks good, but I also would like to see it splited. I would suggest to first get the statement macro part in, which requires less code. Then we can put the namespace macros on top of that. I really like the generality of this approach and would want to also add

[PATCH] D33440: clang-format: better handle statement macros

2017-09-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:2407 + "int b = 0;", + Style); } Please add tests where: - the macro occurs inside a function body, thus having nontrivial indentation - there are two macros

[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternC

2017-09-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: docs/ClangFormatStyleOptions.rst:664 + * ``bool AfterExternC`` Wrap extern "C" blocks. + I think this is overly specific. The C++ standard also [[ http://en.cppreference.com/w/cpp/language/language_linkage | allows

[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternBlock

2017-09-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:1047 +else + parseBlock(/*MustBeDeclaration=*/true, /*AddLevel=*/false); addUnwrappedLine(); Please `clang-format` the newly added lines. https://reviews.ll

[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternBlock

2017-09-14 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks great! Just one more nit: please add a line checking the parsing of the new option similar to the line `CHECK_PARSE_NESTED_BOOL(BraceWrapping, AfterStruct);` in `unittests/Format/FormatTest.cpp`. https://reviews.llvm.org/D37845 ___

[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternBlock

2017-09-15 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! Should I commit this for you? https://reviews.llvm.org/D37845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

[PATCH] D37845: [clang-format] New flag - BraceWrapping.AfterExternBlock

2017-09-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313354: [clang-format] New flag - BraceWrapping.AfterExternBlock (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D37845?vs=115240&id=115394#toc Repository: rL LLVM https://

[PATCH] D37973: [clang-format] Fix regression about short functions after #else

2017-09-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch fixes a regression introduced in r312904, where the formatter confuses the `else` in `#else` with an `else` of an `if-else` statement. For example, formatting this code with google style #ifdef A int f() {} #else

[PATCH] D37904: [clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is true.

2017-09-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Could you please move the test that adds a namespace end comment to `unittests/Format/NamespaceEndCommentsFixerTest.cpp`? https://reviews.llvm.org/D37904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D37904: [clang-format] Fix FixNamespaceComments when BraceWrapping AfterNamespace is true.

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. This is how you could add a test in `NamespaceEndCommentsFixerTest.cpp`: TEST_F(NamespaceEndCommentsFixerTest, FixesNamespaceCommentsInAllmanStyle) { FormatStyle AllmanStyle = getLLVMStyle(); AllmanStyle.BreakBeforeBraces = FormatStyle::BS_Allman; EXPECT_EQ

[PATCH] D37263: [clang-format] Ignore case when sorting using-declarations

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 115998. krasimir added a comment. - Stable sort using declarations https://reviews.llvm.org/D37263 Files: lib/Format/UsingDeclarationsSorter.cpp unittests/Format/UsingDeclarationsSorterTest.cpp Index: unittests/Format/UsingDeclarationsSorterTest.cpp =

[PATCH] D38077: [clangd] Put inacessible items to the end of completion list.

2017-09-20 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. Makes sense. https://reviews.llvm.org/D38077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D38081: Set completion priority of destructors and operators to CCP_Unlikely.

2017-09-20 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. +1! I totally agree with this! https://reviews.llvm.org/D38081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37263: [clang-format] Ignore case and stable sort using-declarations

2017-09-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313963: [clang-format] Ignore case and stable sort using-declarations (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D37263 Files: cfe/trunk/lib/Format/UsingDeclarationsSorter.

[PATCH] D64998: Improve clang-format-diff help output

2019-07-23 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: clang/tools/clang-format/clang-format-diff.py:11 -r""" -ClangFormat Diff Reformatter - - +""" This script reads input from

[PATCH] D65272: Update some tests after r366702

2019-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a reviewer: jdoerfert. Herald added a project: clang. Herald added a subscriber: cfe-commits. r366702 added a set of new clang-cl -- specific openmp flags together with tests. The way the newly added tests work is problematic: consider for example this

[PATCH] D65272: Update some tests after r366702

2019-07-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367012: Update some tests after r366702 (authored by krasimir, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION htt

[PATCH] D65940: [clang-format] fix crash involving invalid preprocessor line

2019-08-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This (invalid) fragment is crashing clang-format: #if 1 int x; #elif int y; #endif The reason being that the parser expects a token after `#elif`, and the subsequent parsing of the ne

[PATCH] D65940: [clang-format] fix crash involving invalid preprocessor line

2019-08-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 214115. krasimir marked an inline comment as done. krasimir added a comment. - Apply review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65940/new/ https://reviews.llvm.org/D65940 Files: lib/Format/TokenAnnotato

[PATCH] D65940: [clang-format] fix crash involving invalid preprocessor line

2019-08-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: unittests/Format/FormatTest.cpp:3090 Style); + // Don't crash if there is nothing following #elif. + verifyFormat("#if 1\n" gribozavr wrote: > `// #elif direc

[PATCH] D65940: [clang-format] fix crash involving invalid preprocessor line

2019-08-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368280: [clang-format] fix crash involving invalid preprocessor line (authored by krasimir, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CH

[PATCH] D60661: Revert "Revert "[clang-format] Keep protobuf "package" statement on one line""

2019-05-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. Sorry for the delay. I'll submit this for you. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60661/new/ https://reviews.llvm.org/D60661 ___ cfe-commits maili

[PATCH] D60661: Revert "Revert "[clang-format] Keep protobuf "package" statement on one line""

2019-05-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC360411: Revert "Revert "[clang-format] Keep protobuf "package" statement on one line"" (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D60661?vs=198585&id=19899

[PATCH] D53072: [clang-format] Introduce the flag which allows not to shrink lines

2018-12-29 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In D53072#1268883 , @yvvan wrote: > Do you know the better way to accomplish my aim than adding an option to > libFormat? For example making a dependent library which serves a little > different purpose than libFormat itself or

[PATCH] D67246: clang-format: Add support for formatting lambdas with explicit template parameters.

2019-09-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll need some more time to investigate the implications of this with respect to Objective-C disambiguation stuff. Specifically, this may interact with funny ways with the heuristic outlined in (old) UnwrappedLineParser.cpp line 1453: // In a C++ lambda a template t

[PATCH] D67246: clang-format: Add support for formatting lambdas with explicit template parameters.

2019-09-13 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. This looks good with the FIXME. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67246/new/ https://reviews.llvm.org/D67246 ___ cfe-com

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

2019-09-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir abandoned this revision. krasimir added a comment. This was for experimental purposes, abandoning. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66653/new/ https://reviews.llvm.org/D66653 ___ cfe-commits mai

[PATCH] D67627: Clang-format: Add Whitesmiths indentation style

2019-09-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Adding @djasper as this is really a re-implementation of https://reviews.llvm.org/D6833. Agree with @MyDeveloperDay that in general we should aim to document all the known cases where a style doesn't work (with FIXMEs etc.), but not submit failing tests. We can have t

[PATCH] D67659: [clang-format] Fix cleanup of `AnnotatedLine` to include children nodes.

2019-09-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. Thank you! Comment at: clang/lib/Format/Format.cpp:1420 -for (auto &Line : AnnotatedLines) { - if (Line->Affected) { -cleanupRight(Line->First, tok::co

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-09-30 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/Format.cpp:1891 + if (compareIgnoringCarriageReturns( + result, Code.substr(IncludesBeginOffset, IncludesBlockSize))) return; Here `compartIgnoringCarriageReturns` is a bit imprecise: the

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-10-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/Format.cpp:1828 +// Replace "\r\n" with "\n" +std::string replaceCRLF(std::string Code) { nit: missing trailing fullstop. Comment at: clang/lib/Format/Format.cpp:1832 + while ((Pos

[PATCH] D68227: [clang-format] [PR43372] - clang-format shows replacements in DOS files when no replacement is needed

2019-10-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. Thank you! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68227/new/ https://reviews.llvm.org/D68227 ___ cfe-

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 142394. krasimir marked an inline comment as done. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D44203 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestProto.cpp unittests/Format/

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330016: [clang-format] Improve Incomplete detection for (text) protos (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D44203?vs=142394&id=142396#toc Repository:

[PATCH] D44203: [clang-format] Improve Incomplete detection for (text) protos

2018-04-13 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:773 case tok::r_brace: - // Lines can start with '}'. - if (Tok->Previous) + // Lines can start with '}' except in text protos. + if (Tok->Previous || Style.Language == FormatStyle:

[PATCH] D45726: Format closing braces when reformatting the line containing theopening brace.This required a couple of yaks to be shaved:1. MatchingOpeningBlockLineIndex was misused to also store the

2018-04-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Great patch! Comment at: lib/Format/AffectedRangeManager.cpp:144 + Line->First->is(tok::r_brace) && + Line->MatchingOpeningBlockLineIndex != -1 && + Lines[Line->MatchingOpeningBlockLineIndex]->Affected; nit: replace `-1`

[PATCH] D45726: Format closing braces when reformatting the line containing theopening brace.

2018-04-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Another point: for the example in the summary about bailing-out early, is there a test for this already? If not, we should add one. Repository: rC Clang https://reviews.llvm.org/D45726 ___ cfe-commits mailing list cfe-c

[PATCH] D45373: [clang-format] Don't remove empty lines before namespace endings

2018-04-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: lib/Format/NamespaceEndCommentsFixer.h:24 +// Finds the namespace token corresponding to a closing namespace `}`, if that +// is to be formatted. djasper wrote: > I don't und

[PATCH] D45373: [clang-format] Don't remove empty lines before namespace endings

2018-04-19 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. krasimir marked an inline comment as done. Closed by commit rL330324: [clang-format] Don't remove empty lines before namespace endings (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Changed

[PATCH] D46062: [clang-format] Start formatting cpp code in raw strings in google style

2018-04-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added a reviewer: klimek. Herald added a subscriber: cfe-commits. This adds some delimiters to detect cpp code in raw strings. Repository: rC Clang https://reviews.llvm.org/D46062 Files: lib/Format/Format.cpp Index: lib/Format/Format.cpp =

[PATCH] D46062: [clang-format] Start formatting cpp code in raw strings in google style

2018-04-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330832: [clang-format] Start formatting cpp code in raw strings in google style (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D46062?vs=143931&id=143933#toc R

[PATCH] D46519: [clang-format] Respect BreakBeforeClosingBrace while calculating length

2018-05-07 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added subscribers: cfe-commits, klimek. This patch makes `getLengthToMatchingParen` respect the `BreakBeforeClosingBrace` ParenState for matching scope closers. In order to distinguish between paren states introduced by real vs. fake parens, I've added the

[PATCH] D46572: [clang-format] Add raw string formatting to release notes

2018-05-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D46572 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.rst +++ docs/Rele

[PATCH] D46572: [clang-format] Add raw string formatting to release notes

2018-05-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331750: [clang-format] Add raw string formatting to release notes (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46572 Fi

[PATCH] D46519: [clang-format] Respect BreakBeforeClosingBrace while calculating length

2018-05-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 145661. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D46519 Files: lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Format/Unw

[PATCH] D46519: [clang-format] Respect BreakBeforeClosingBrace while calculating length

2018-05-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done and an inline comment as not done. krasimir added inline comments. Comment at: lib/Format/ContinuationIndenter.cpp:44 + int MatchingStackIndex = Stack.size() - 1; + while (MatchingStackIndex >= 0 && Stack[MatchingStackIndex].Tok != &Tok

[PATCH] D46519: [clang-format] Respect BreakBeforeClosingBrace while calculating length

2018-05-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 145677. krasimir added a comment. - Added other parens detection Repository: rC Clang https://reviews.llvm.org/D46519 Files: lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Format/UnwrappedLineFormatter.cpp unittests/Fo

[PATCH] D46519: [clang-format] Respect BreakBeforeClosingBrace while calculating length

2018-05-08 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:93 + break; +if (End->Next->is(tok::r_brace)) { + const ParenState *State = FindParenState(End->Next->MatchingParen); djasper

[PATCH] D48543: [clang-format] Keep @message together in text protos

2018-06-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: cfe-commits. In C++ code snippets of the form `@field` are common. This makes clang-format keep them together in text protos, whereas before it would break them. Repository: rC Clang https://reviews.llvm.org/D48543 Files: lib/Forma

[PATCH] D48543: [clang-format] Keep @message together in text protos

2018-06-25 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC335459: [clang-format] Keep @message together in text protos (authored by krasimir, committed by ). Changed prior to comm

[PATCH] D48363: [clang-format] Enable text proto formatting in common functions

2018-06-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335595: [clang-format] Enable text proto formatting in common functions (authored by krasimir, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D483

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