[PATCH] D115738: [clang-format] Code following C# Lambda Expressions has wrong formatting

2021-12-14 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2007 +if (FormatTok->is(tok::l_brace)) { + if (Style.isCSharp() && Style.BraceWrapping.AfterFunction == true) { +FormatTok->MustBreakBefore = true; I

[PATCH] D104388: [clang-format] PR50727 C# Invoke Lamda Expression indentation incorrect

2021-06-29 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a subscriber: krasimir. jbcoe added a comment. Some outstanding nits to address but this looks good to me. With @krasimir I implemented a good fraction of the C# support and am confident that these changes are an improvement. CHANGES SINCE LAST ACTION

[PATCH] D103307: [clang-format] successive C# attributes cause line breaking issues

2021-05-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. Thanks for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103307/new/ https://reviews.llvm.org/D103307

[PATCH] D101702: [clang-format] Add more support for C# 8 nullables

2021-05-05 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Thanks for this patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101702/new/ https://reviews.llvm.org/D101702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D82016: [clang-format] [PR462254] fix indentation of default and break correctly in whitesmiths style

2020-06-17 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. Thanks for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82016/new/ https://reviews.llvm.org/D82016

[PATCH] D81467: [clang-format] Microsoft style fixes for C# properties

2020-06-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: krasimir, MyDeveloperDay. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land.

[PATCH] D81394: [clang-format] Brace breaking for C# lambdas

2020-06-08 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 269262. jbcoe added a comment. Amend comment - behaviour with addUnwrappedLine is expected and applied fix is fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81394/new/ https://reviews.llvm.org/D81394 Files:

[PATCH] D81255: [clang-format] treat 'lock' as a keyword for C# code

2020-06-05 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. krasimir accepted this revision. This revision is now accepted and ready to land. This will put a space in `lock (process)`

[PATCH] D80490: [clang-tidy] Check for rule of five and zero.

2020-06-01 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Perhaps associated is https://github.com/isocpp/CppCoreGuidelines/issues/870 which was closed but never (in my mind) resolved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80490/new/ https://reviews.llvm.org/D80490

[PATCH] D80490: [clang-tidy] Check for rule of five and zero.

2020-06-01 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. https://reviews.llvm.org/D16376 was written by me, I'm afraid I don't recall why I abandoned it and was surprised to see that it had not been submitted. I don't feel comfortable approving work based on my own but this patch looks great to me. Repository: rG LLVM

[PATCH] D79000: [clang-format] C# property formatting can be controlled by config options

2020-05-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe closed this revision. jbcoe added a comment. Submitted as 8fa743ab82027da443bac050e86b70bcdb78cbee Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79000/new/

[PATCH] D79715: [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide

2020-05-14 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. I will get the Google Style guide uploaded and update this patch with a link. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79715/new/ https://reviews.llvm.org/D79715

[PATCH] D79715: [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide

2020-05-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I expect that accepting this patch will need require an update to be made to https://github.com/google/styleguide. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79715/new/ https://reviews.llvm.org/D79715

[PATCH] D79715: [clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide

2020-05-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79715 Files: clang/lib/Format/Format.cpp

[PATCH] D79414: [clang-format] C# always regards && as a binary operator

2020-05-05 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: krasimir, MyDeveloperDay. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready

[PATCH] D79000: [clang-format] C# property formatting can be controlled by config options

2020-04-29 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. public int Style2 { get; set } appears in MS examples https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties public int Style2 { get; set } is the style we use in our code (where the formatter will be put to immediate

[PATCH] D79000: [clang-format] C# property formatting can be controlled by config options

2020-04-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Reverted this commit. Will pick this up tomorrow. Apologies for the noise! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79000/new/ https://reviews.llvm.org/D79000 ___

[PATCH] D79000: [clang-format] C# property formatting can be controlled by config options

2020-04-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I've just merged this in by mistake. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79000/new/ https://reviews.llvm.org/D79000 ___ cfe-commits mailing list

[PATCH] D79008: [clang-format] insert space after C# keyword var in var (key, value)

2020-04-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: krasimir, MyDeveloperDay. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D79008 Files:

[PATCH] D79000: [clang-format] C# property accessor formatting can be controlled by config options

2020-04-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: krasimir, MyDeveloperDay. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Allow brace wrapping in C# property accessors to be controlled by configuration options. Add new tests and

[PATCH] D78915: [clang-format] Improved parser for C# properties

2020-04-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 260599. jbcoe marked 3 inline comments as done. jbcoe added a comment. Added missing comments. Complied with LLVM style. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78915/new/ https://reviews.llvm.org/D78915 Files:

[PATCH] D78915: [clang-format] Improved parser for C# properties

2020-04-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 260316. jbcoe added a comment. Format patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78915/new/ https://reviews.llvm.org/D78915 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D78915: [clang-format] Improved parser for C# properties

2020-04-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: krasimir, MyDeveloperDay. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added some examples of properties from Microsoft documentation as test cases.

[PATCH] D78909: [clang-format] NFC clang-format the clang-format sources

2020-04-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78909/new/ https://reviews.llvm.org/D78909

[PATCH] D78642: [clang-format] Handle C# property accessors when parsing lines

2020-04-23 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked 2 inline comments as done. jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1344 addUnwrappedLine(); FormatTok->Type = TT_FunctionLBrace; parseBlock(/*MustBeDeclaration=*/false);

[PATCH] D78642: [clang-format] Handle C# property accessors when parsing lines

2020-04-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 259409. jbcoe added a comment. Format patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78642/new/ https://reviews.llvm.org/D78642 Files: clang/lib/Format/UnwrappedLineFormatter.cpp clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D78642: [clang-format] Handle C# property accessors when parsing lines

2020-04-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: krasimir, MyDeveloperDay. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Improve C# `{ get; set; } = default;` formatting by handling it in the UnwrappedLineParser rather than trying

[PATCH] D78295: [clang-format] Do not interpret C# deconstruction in a foreach as a cast

2020-04-16 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 258035. jbcoe added a comment. Format patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78295/new/ https://reviews.llvm.org/D78295 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D78295: [clang-format] Do not interpret C# deconstruction in a foreach as a cast

2020-04-16 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D78295 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D77064: [clang-format] Correct line breaks in C# generic type constraints

2020-03-31 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 253925. jbcoe added a comment. Fix failing test by preventing inconsistent states from being constructed where canBreak is false and mustBreak is true. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77064/new/ https://reviews.llvm.org/D77064 Files:

[PATCH] D77064: [clang-format] Correct line breaks in C# generic type constraints

2020-03-30 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D77064 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D76621: [clang-format] No space inserted between commas in C#

2020-03-23 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. krasimir accepted this revision. This revision is now accepted and ready to land. Repository: rG LLVM Github Monorepo

[PATCH] D75760: [clang-format] Do not indent C# array initialisers as continuations

2020-03-23 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 252028. jbcoe added a comment. Rebase and update patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75760/new/ https://reviews.llvm.org/D75760 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D76597: [clang-format] Reflow long C# generic type constraints correctly

2020-03-23 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Align sequential generic type constraints on a type. Indent sequential generic type constraints on different types as

[PATCH] D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers

2020-03-23 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. That's right David, this typo was fixed in a reverted and re-applied commit: https://reviews.llvm.org/D75856, https://reviews.llvm.org/D75747 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75747/new/

[PATCH] D76367: [clang-format] Handle C# generic type constraints

2020-03-19 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 251349. jbcoe added a comment. Address review comments to move deleted test and remove redundant code. Redundant call to `parseCSharpGenericTypeConstraint` was used for free functions which are not legal in C#. CHANGES SINCE LAST ACTION

[PATCH] D76367: [clang-format] Handle C# generic type constraints

2020-03-18 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Treat each C# generic type constraint, `where T: ...`, as a line. Add C# keyword: where Add Token Types:

[PATCH] D75760: [clang-format] Do not indent C# array initialisers as continuations

2020-03-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1443 +if (Style.isCSharp()) + FormatTok->BlockKind = BK_BracedInit; nextToken(); krasimir wrote: > A more general

[PATCH] D75983: [clang-format] Improved identification of C# nullables

2020-03-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 249596. jbcoe added a comment. Fix nits from review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75983/new/ https://reviews.llvm.org/D75983 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D75984: [clang-format] No space in 'new()' and 'this[Type x]' in C#

2020-03-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75984 Files: clang/lib/Format/TokenAnnotator.cpp

[PATCH] D75983: [clang-format] Improved identification of C# nullables

2020-03-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Allow '?' inside C# generics. Do not mistake casts like (Type?) as conditional operators. Repository: rG LLVM

[PATCH] D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers

2020-03-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 249155. jbcoe added a comment. Format code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75747/new/ https://reviews.llvm.org/D75747 Files: clang/lib/Format/ContinuationIndenter.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D75731: [clang-format] C# does not indent braced initializers as continuations

2020-03-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked 2 inline comments as done. jbcoe added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:544 Shape[] shapes = new[] { new Circle { Radius = 2.7281, Colour = Colours.Red }, - new Square { -

[PATCH] D75856: [clang-format] cleanup from D75517

2020-03-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 249148. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75856/new/ https://reviews.llvm.org/D75856 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTestCSharp.cpp Index: clang/unittests/Format/FormatTestCSharp.cpp

[PATCH] D75856: [clang-format] cleanup from D75517

2020-03-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix typo in comment. Add closing brace to test text. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75856

[PATCH] D75760: [clang-format] Do not indent C# array initialisers as continuations

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. jbcoe added a comment. Needs https://reviews.llvm.org/D75731 and https://reviews.llvm.org/D75747 to be merged first. Flag

[PATCH] D75760: [clang-format] Do not indent C# array initialisers as continuations

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Needs https://reviews.llvm.org/D75731 and https://reviews.llvm.org/D75747 to be merged first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75760/new/ https://reviews.llvm.org/D75760

[PATCH] D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. jbcoe added a comment. Requires https://reviews.llvm.org/D75731 to be merged first. Do not use continuation indent for '['

[PATCH] D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Requires https://reviews.llvm.org/D75731 to be merged first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75747/new/ https://reviews.llvm.org/D75747 ___ cfe-commits mailing

[PATCH] D75731: [clang-format] C# does not indent braced initializers as continuations

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 248719. jbcoe added a comment. Remove comma to tidy up ugly format test and actually test what is needed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75731/new/ https://reviews.llvm.org/D75731 Files: clang/lib/Format/FormatToken.h

[PATCH] D75731: [clang-format] C# does not indent braced initializers as continuations

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 248712. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75731/new/ https://reviews.llvm.org/D75731 Files: clang/lib/Format/FormatToken.h clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

[PATCH] D75731: [clang-format] C# does not indent braced initializers as continuations

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. C# treats object initializers as braced init blocks. Braced init blocks are no longer indented as continuations.

[PATCH] D75606: [clang-format] Improve identification of C# nullables

2020-03-04 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 248232. jbcoe marked an inline comment as done. jbcoe added a comment. Remove duplicate check following review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75606/new/ https://reviews.llvm.org/D75606 Files:

[PATCH] D75606: [clang-format] Improve identification of C# nullables

2020-03-04 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider `? identifier =` and `? identifier;` to be nullable within function bodies. Repository: rG LLVM Github Monorepo

[PATCH] D75473: [clang-format] parse C# object initialisers

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 248039. jbcoe added a comment. Remove code without test coverage. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75473/new/ https://reviews.llvm.org/D75473 Files: clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D75473: [clang-format] parse C# object initialisers

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1978 + if (FormatTok->is(tok::l_paren)) +parseParens(); + krasimir wrote: > I don't understand why this is needed, and removing

[PATCH] D75517: [clang-format] Do not format C# array subscript operators as attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix misidentification of C# array subscript operators. Repository: rG LLVM Github Monorepo

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247832. jbcoe marked 2 inline comments as done. jbcoe added a comment. Do not allow spaces around C# attribute colons. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75465/new/ https://reviews.llvm.org/D75465 Files:

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:391 if (!AttrTok) - return false; + return true; This is needed to avoid ``` [assembly:InternalsVisibleTo("SomeAssembly,

[PATCH] D75194: [clang-format] Do not merge very long C# automatic properties

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. I will try to handle this in unwrapped line parser. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75194/new/ https://reviews.llvm.org/D75194

[PATCH] D75473: [clang-format] parse C# object initialisers

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Treat C# object initializers as braced lists. Allow lambdas inside C# braced lists. Repository: rG LLVM Github Monorepo

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Re-use token type `TT_AttributeColon` for C# attribute target colons. Repository: rG LLVM Github Monorepo

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247643. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75456/new/ https://reviews.llvm.org/D75456 Files: clang/lib/Format/FormatToken.h clang/lib/Format/FormatTokenLexer.cpp clang/lib/Format/TokenAnnotator.cpp

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rename CSharpNullConditionalSq to CSharpNullConditionalLSquare. Add test for spaces inside [] with C# Null conditionals.

[PATCH] D75455: [clang-format] Allow nested [] in C# attributes

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Keep track of unpaired [] when identifying C# attribute lines Repository: rG LLVM Github Monorepo

[PATCH] D75368: [clang-format] Handle NullCoalescing and NullConditional operators in C#

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247610. jbcoe edited the summary of this revision. jbcoe added a comment. Do not add new punctuators for ??, ?. and ?[ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 Files: clang/lib/Format/FormatToken.h

[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. Handle ??, ?. and ?[ in lib/Format/FormatTokenLexer. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 ___ cfe-commits mailing list

[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247399. jbcoe added a comment. Fix failing test by parsing tokens after '?[' in the same way as tokens after '['. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 Files:

[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. There's a weird test failure I'm unable to reproduce outside of the tests with real source code where public static void Main(string[] args) { string dirPath = args?[0]; } is (mis)-formatted as public static void

[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. jbcoe planned changes to this revision. jbcoe added a comment. There's a weird test failure I'm unable to reproduce outside of

[PATCH] D75194: [clang-format] Do not merge very long C# automatic properties

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:489 +// If the Limit is broken, split the default value onto a new line and +// indent it. +// krasimir wrote: > Why not

[PATCH] D75336: [clang-format] Improve C# handling of spaces in square brackets

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: MyDeveloperDay, krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75336 Files:

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247193. jbcoe added a comment. Add additional test following review discussion CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75261/new/ https://reviews.llvm.org/D75261 Files: clang/lib/Format/FormatToken.h clang/lib/Format/TokenAnnotator.cpp

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:178 verifyFormat( - "public Person(string firstName, string lastName, int? age=null)"); + "public Person(string firstName, string lastName,

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Do not confuse C# nullable types with conditional expressions. Do not put a space before the `?` in `[access-modifier] Type?

[PATCH] D75244: [clang-format] Recognize C# named argument colons as a token type

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 246924. jbcoe added a comment. Consolidate if blocks following review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75244/new/ https://reviews.llvm.org/D75244 Files: clang/lib/Format/FormatToken.h clang/lib/Format/FormatTokenLexer.cpp

[PATCH] D75244: [clang-format] Recognize C# named argument colons as a token type

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. No longer merge 'name' and ':' into a single token. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75244

[PATCH] D75006: [clang-format] Wrap lines for C# property accessors

2020-02-25 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:246 - "get;\n" - "}"); MyDeveloperDay wrote: > Nit: I feel like this layout should really be an option,

[PATCH] D75006: [clang-format] Wrap lines for C# property accessors

2020-02-24 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 246235. jbcoe added a comment. This revision is now accepted and ready to land. Simplify logic for merging property accessors CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75006/new/ https://reviews.llvm.org/D75006 Files:

[PATCH] D75006: Wrap lines for C# property accessors

2020-02-24 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 246170. jbcoe added a comment. Handle C# access modifier `internal `. Fix typo in test for expression-bodied get/set methods. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75006/new/ https://reviews.llvm.org/D75006 Files:

[PATCH] D75006: Wrap lines for C# property accessors

2020-02-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 246070. jbcoe added a comment. Code and test to avoid wrapping accessors with expression body definitions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75006/new/ https://reviews.llvm.org/D75006 Files: clang/lib/Format/UnwrappedLineFormatter.cpp

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

2020-01-31 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 241694. jbcoe added a comment. Minor changes to address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72401/new/ https://reviews.llvm.org/D72401 Files: clang/lib/Format/TokenAnnotator.cpp

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

2020-01-23 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 239836. jbcoe added a comment. Extended tests and added some comments explaining why seeming duplicated tests are useful. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72144/new/ https://reviews.llvm.org/D72144 Files:

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

2020-01-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 239629. jbcoe added a comment. Removed test snippets that did not exercise new code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72144/new/ https://reviews.llvm.org/D72144 Files: clang/lib/Format/TokenAnnotator.cpp

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

2020-01-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked 2 inline comments as done. jbcoe added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:259 + + verifyFormat("using (StreamWriter sw = new StreamWriter(filenameB)) {}", + Style); krasimir wrote: > Can this

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

2020-01-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 239574. jbcoe added a comment. Handle `using` case where SpaceBeforeParensOptions is set to SBPO_NonEmptyParentheses CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72144/new/ https://reviews.llvm.org/D72144 Files:

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

2020-01-08 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. jbcoe added reviewers: MyDeveloperDay, klimek. Fix spaces around typename and [] in C# object initializers. Handling of newlines and binpacking will be

[PATCH] D72150: Allow space after C-style cast in C# code

2020-01-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: klimek. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72150 Files: clang/lib/Format/TokenAnnotator.cpp

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

2020-01-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 236035. jbcoe added a reviewer: klimek. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72144/new/ https://reviews.llvm.org/D72144 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTestCSharp.cpp Index:

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

2020-01-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Unless SpaceBeforeParensOptions is set to SBPO_Never, a space will be put between `using` and `(` in C# code. Repository: rG LLVM Github Monorepo

[PATCH] D51299: [python bindings] Expose template argument API for Type

2018-09-11 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341930: [python bindings] Expose getNumTemplateArguments (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D51299 Files:

[PATCH] D51299: [python bindings] Expose template argument API for Type

2018-09-11 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341930: [python bindings] Expose getNumTemplateArguments (authored by jbcoe, committed by ). Changed prior to commit: https://reviews.llvm.org/D51299?vs=162667=164854#toc Repository: rL LLVM

[PATCH] D51299: [python bindings] Expose template argument API for Type

2018-09-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can commit this. Thanks for the great work! Repository: rC Clang https://reviews.llvm.org/D51299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47864: [python] Fix most Python binding unittests on Windows

2018-06-21 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335282: [bindings] Fix most Python binding unittests on Windows (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47864 Files:

[PATCH] D47864: [python] Fix most Python binding unittests on Windows

2018-06-21 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Would you like me to commit this for you? Repository: rC Clang https://reviews.llvm.org/D47864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46383: implementing Cursor.get_included_file in python bindings

2018-05-10 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332045: implementing Cursor.get_included_file in python bindings (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D46383: implementing Cursor.get_included_file in python bindings

2018-05-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I will try to commit this today. Repository: rC Clang https://reviews.llvm.org/D46383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE330772: [clang-tidy] Improve bugprone-unused-return-value check (authored by jbcoe, committed by ). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 Files:

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can merge this for you. Congratulations on the commit! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45671: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug 36677

2018-04-22 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330557: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug… (authored by jbcoe, committed by ). Repository: rL LLVM https://reviews.llvm.org/D45671 Files:

  1   2   >