[PATCH] D67750: Allow additional file suffixes/extensions considered as source in main include grouping

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. This revision now requires changes to proceed. I think fundamentally this seems like a reasonable idea, for those that don't need they don't need to use it. =

[PATCH] D69388: [clang-tidy] Fix modernize-use-nodiscard check for classes marked as [[nodiscard]]

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thank you for the patch, I wrote this checker originally and this LGTM. I'm not sure if others have any objections to using "using clang::attr::WarnUnusedResult" in the body of the function, I couldn't see this pattern used elsewhere in clang-tidy, all I've seen

[PATCH] D68969: [clang-format] Remove the dependency on frontend

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. MyDeveloperDay marked an inline comment as done. Closed by commit rGec66603ac7ea: [clang-format] Remove the dependency on frontend (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D68914: [clang-format] Remove duplciate code from Invalid BOM detection

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8fa5e98fd191: [clang-format] Remove duplciate code from Invalid BOM detection (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D689

[PATCH] D31574: [clang-format] update documentation

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. When I land this change, I'll include the ClangFormatStyleOptions.rst to match (plus some minor NFC) in Format.h that are preventing dump_format_style.py from being rerun in a later commit I'll try and bring the Format.h and ClangFormaatStyleOptions.rst back in

[PATCH] D31574: [clang-format] update documentation

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG23b78364150c: [clang-format] update documentation (authored by MyDeveloperDay). Changed prior to commit: https://reviews.llvm.org/D31574?vs=223443&id=226316#toc Repository: rG LLVM Github Monorepo C

[PATCH] D67541: [ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. ClangFormatStyleOptions.rst and Format.h are inconsistent which means when clang/doc/tools/dump_format_style.py is run the rst file being generated is in danger of overwriting your changes (which I think you might have made by hand). I'm happy to try and fix this

[PATCH] D69404: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct.

2019-10-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, mitchell-stellar, owenpan. MyDeveloperDay added projects: clang-format, clang. Running dump_format_style.py on the tip of the trunk causes ClangFormatStyleOptions.rst to have changes, which I think ideally it shouldn't.

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:187 /// expressions. - /// - /// Specifically, this aligns operands of a single expression that needs to be - /// split over multiple lines, e.g.: - /// \code - /// int aaa =

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. I've read back through the previous comments, and I'm slightly struggling to understand the reason for the objections. (other than the normal public style) I'd tend to be wary

[PATCH] D69404: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct.

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6df7ef0d8baa: [clang-format] [NFC] update the documentation in Format.h to allow… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, mitchell-stellar, sammccall. MyDeveloperDay added projects: clang, clang-format. a change D67541: [ClangFormat] Future-proof Standard option, allow floating or pinning to arbitrary lang version

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:1971 + /// be affected. /// \code ///true: false: my assumption here was that the te

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. For help for the reviewers...here is the before and after Before: F10399858: image.png After: F10399852: image.png Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D68296: [clang-format] Add ability to wrap braces after multi-line control statements

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: cfe/trunk/docs/ClangFormatStyleOptions.rst:812 + Always wrap braces after a control statement. + + .. code-block:: c++ This text cannot be generated by dump_format_style.py in clang/docs/tools from the

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/docs/tools/dump_format_style.py:175 +val = line.replace(',', '') +pos = val.find(" // ") +if (pos != -1): mitchell-stellar wrote: > Th

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/docs/tools/dump_format_style.py:175 +val = line.replace(',', '') +pos = val.find(" // ") +if (pos != -1): mitchell-stellar wrote: > My

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/docs/tools/dump_format_style.py:175 +val = line.replace(',', '') +pos = val.find(" // ") +if (pos != -1): MyDeveloperDay wrote: > mitc

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D69433#1722463 , @mrexodia wrote: > I don't really have a say in this, but I was trying to run the python script > to generate the rst file and it didn't work. I tried fixing it, but it's > definitely very hacky. Perhap

[PATCH] D69238: Fix clang-tidy readability-redundant-string-init for c++17/c++2a

2019-10-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/RedundantStringInitCheck.cpp:50 varDecl(hasType(hasUnqualifiedDesugaredType(recordType( hasDeclaration(cxxRecordDecl(hasName("basic_string")),

[PATCH] D69548: Give clang-tidy readability-redundant-string-init a customizable list of string types to fix

2019-10-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Thanks you so much for this patch, I obviously like it! So many of us who write our own string classes we tend to make them have similar interfaces to std::string anyway for obvious reasons (some of us actually add decent startWith,endsWith and contains functions

[PATCH] D69433: [clang-format] [NFC] update the documentation in Format.h to allow dump_format_style.py to get a little closer to being correct. (part 2)

2019-10-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 4 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2343 Use C++14-compatible syntax. +``Cpp11``: deprecated alias for ``Latest`` sammccall wrote: > sammccall wrote:

[PATCH] D69573: [clang-format] [PR36294] AlwaysBreakAfterReturnType works incorrectly for some operator functions

2019-10-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: mitchell-stellar, klimek, owenpan, sammccall. MyDeveloperDay added projects: clang-format, clang-tools-extra. Herald added a project: clang. https://bugs.llvm.org/show_bug.cgi?id=36294 Addressing bug related to returning after

[PATCH] D69577: [clang-format] [PR35518] C++17 deduction guides are wrongly formatted

2019-10-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: klimek, mitchell-stellar, owenpan, sammccall. MyDeveloperDay added projects: clang-format, clang-tools-extra. Herald added a project: clang. see https://bugs.llvm.org/show_bug.cgi?id=35518 clang-format removes spaces around ded

[PATCH] D80176: [clang-format][PR45816] Add AlignConsecutiveBitFields

2020-05-19 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80176/new/ https://reviews.llvm.org/D80176 ___ cfe-commits mailing list cfe-com

[PATCH] D79465: [clang-format] Fix line lengths w/ comments in align

2020-05-19 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe71c537a487c: [clang-format] Fix line lengths w/ comments in align (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79465/new/ ht

[PATCH] D79325: [clang-format] [PR42164] Add Option to Break before While

2020-05-19 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG807ab2cd0db3: [clang-format] [PR42164] Add Option to Break before While (authored by MyDeveloperDay). Changed prior to commit: https://reviews.llvm.org/D79325?vs=264235&id=265153#toc Repository: rG L

[PATCH] D80176: [clang-format][PR45816] Add AlignConsecutiveBitFields

2020-05-19 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb99bf0e08be4: [clang-format][PR45816] Add AlignConsecutiveBitFields (authored by MyDeveloperDay). Changed prior to commit: https://reviews.llvm.org/D80176?vs=265048&id=265152#toc Repository: rG LLVM

[PATCH] D80228: [clang-format] [PR33890] Add support for Microsoft C++/CLI non standard for each looping extension

2020-05-19 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcc918e90c048: [clang-format] [PR33890] Add support for Microsoft C++/CLI non standard for… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1566 Current.Type = TT_TrailingReturnArrow; - +} else if (Current.is(tok::arrow) && C

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D75791#2045986 , @MarcusJohnson91 wrote: > In D75791#2044492 , @MyDeveloperDay > wrote: > > > If you want me to land this for you, I'd feel more comfortable landing it > > if: >

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265216. MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added reviewers: miscco, JakeMerdichAMD. MyDeveloperDay added a comment. Add new `AlwaysBreakBeforeConceptDeclarations` Better handling of requires expressions vs constraint expres

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 7 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2281 + if (FormatTok->Tok.is(tok::kw_requires)) +parseRequires(); +} miscco wrote: > I believe this should be `parseCo

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added a comment. In D79773#2046565 , @miscco wrote: > Question: Should I add my wip work as a child revision or what would you > suggest Certainly your revision on github was useful for me

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D79773#2046833 , @miscco wrote: > It seems the spacing of the binary operator is not yet stable. This test is > breaking for me: > > verifyFormat("template \nconcept someConcept = Constraint1 > && Constraint2;"); >

[PATCH] D80214: [clang-format] Set of unit test to begin to validate that we don't change defaults

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265331. MyDeveloperDay added a comment. Adding WebKitStyle() CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80214/new/ https://reviews.llvm.org/D80214 Files: clang/unittests/Format/FormatTest.cpp Index: clang/unittests/Format/FormatTest.c

[PATCH] D80214: [clang-format] Set of unit test to begin to validate that we don't change defaults

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think we should take these tests now once they are landed, and we can begin to flesh them out with for() , do(), while() if() conditions so we always know we are not breaking the default style. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80214/new/

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6ef45b0426a8: [clang-format] Added new option IndentExternBlock (authored by MyDeveloperDay). Changed prior to commit: https://reviews.llvm.org/D75791?vs=264916&id=265337#toc Repository: rG LLVM Gith

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-05-20 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/include/clang/Format/Format.h:1531 +/// \endcode +/// +/// \code @MarcusJohnson91 I had to make a couple of minor changes before committing 1) it needed rebasing (because of changes from this m

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > As @MyDeveloperDay said, I'd like it mean C++ only. I find it confusing that > it means C++ or ObjC (even if the latter is a superset of the former). I'd > rather see it spelt as `isCppOrObjC()` even if it's verbose but at least > removes all confusion IMO.

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added a comment. I feel like there might something of a concencus forming.. If I take the time to redo following the suggestions @sammccall do you think you could live with it? Comment at: clang/include/clang/For

[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability

2020-05-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D69764#2050226 , @steveire wrote: > I like the approach of using clang-format to implement this. It's much faster > than a `clang-tidy` approach. > > The broader C++ community has already chosen `East`/`West` and it ha

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265684. MyDeveloperDay added a comment. Switch to new function name suggestions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80079/new/ https://reviews.llvm.org/D80079 Files: clang/include/clang/Format/Format.h clang/lib/Format/Breakabl

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-22 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I get the point about Opt In, and if we are going to add an option it needs to go in ASAP otherwise too many people will then start complaining it was on by default before. To be honest I think the question is do we consider this a bug or a feature, because we D

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265847. MyDeveloperDay added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst clang/include/clang/Forma

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265885. MyDeveloperDay added a comment. switch function to unsigned CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst clan

[PATCH] D80486: [clang-format][PR46043] Parse git config w/ implicit values

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80486/new/ https://reviews.llvm.org/D80486 ___

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265949. MyDeveloperDay retitled this revision from "[clang-format] Add Left/Right Const fixer capability" to "[clang-format] Add East/West Const fixer capability". MyDeveloperDay added a comment. Add more test cases Cover more template and namespace ca

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. > I would like to reiterate my discomfort with using East/West as the > identifiers here I'd like to think that I can see it from both angles, @steveire is correct, if I just supply Left/Right then we'll have a req

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay added a comment. @steveire I'm still working on this I have just one issue from your lit that is failing (see below), but I wanted to capture the other changes in the review. const Foo>* p = const_cast>*>(&ffi); CHANGES SINCE L

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Foo> P; // This is needed to trigger the above 'const const' bug above: #if 0 #else #endif produces Foo const const> P; This bug is caused by the way clang-format re-parses the code for each conditional that the preprocessor caused (I actually di

[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > I know that we didn't have a test for this in ObjC land, but the regression > seems severe enough to revert this Sure go ahead, that's the process. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80144/new/ https

[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. maybe for now we just do if (FormatTok->is(tok::l_square) && !Style.isObjC()) parseSquare(); Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80144/new/ https://reviews.llvm.org/D80144 __

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266046. MyDeveloperDay added a comment. Handle more cases, Currently on this case is failing, the preprocess lines are causing multiple replacements which means const gets move more than once. verifyFormat("Foo> P;\n#if 0\n#else\n#endif", "Foo con

[PATCH] D80528: [clang-format][WIP] Run more stability FormatTests

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. I think this is a noble effort, assuming all the tests pass as far as I'm concerned this LGTM. How about committing all the ones that pass, then work on the others that don't

[PATCH] D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Will this help? D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D801

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, JakeMerdichAMD. MyDeveloperDay added projects: clang, clang-format. D80144: [clang-format] @lefticus just taught the world how to use [[unlikely]] but we forgot to teach clang-format

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2348 +// its not then rewind to the original position +bool UnwrappedLineParser::tryToParseAttribute() { + unsigned StoredPosition = Tokens

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2348 +// its not then rewind to the original position +bool UnwrappedLineParser::tryToParseAttribute() { + unsigned StoredPosition = Tokens

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2348 +// its not then rewind to the original position +bool UnwrappedLineParser::tryToParseAttribute() { + unsigned StoredPosition = Tokens

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266192. MyDeveloperDay added a comment. Check for null Tok Fix up comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80547/new/ https://reviews.llvm.org/D80547 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/lib/Format/Unwrappe

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266204. MyDeveloperDay added a comment. Handle more complex nested ObjC calls Rename function to tryParseSimpleAttributes (not supporting full capability as yet) Use RAII object to reset the TokenPosition utilize the fact that Objective calls shouldn't

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266231. MyDeveloperDay added a comment. Add more tests and check if a ';' follows the final ]] CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80547/new/ https://reviews.llvm.org/D80547 Files: clang/lib/Format/UnwrappedLineParser.cpp clang

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1965 // handle [[likely]] / [[unlikely]] - if (FormatTok->is(tok::l_square)) + if (FormatTok->is(tok::l_square) && tryToParseSimpleAttr

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266248. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. Address nits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80547/new/ https://reviews.llvm.org/D80547 Files: clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D80547: [clang-format] Fix an ObjC regression introduced with new [[likely]][[unlikely]] support in if/else clauses

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f1156a7d004: [clang-format] Fix an ObjC regression introduced with new [[likely]]… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D80548: [Analyzer][NFC] Remove the SubEngine interface

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I think the buildbot might be failing http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3664 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80548/new/ https://reviews.llvm.org/D80548

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:2547 + if (Style.isCpp() || Style.Language == FormatStyle::LK_ObjC) { +if (Style.ConstStyle != FormatStyle::CS_Leave) aaron.ballm

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I really do appreciate the reviews and the comments especially regarding east/west/left/right/wrong ;-), I know there won't be 100% agreement, but I think most people who even consider clone the LLVM repo know what we mean by East/West. as such I'm going to leave

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266358. MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. Fix issue when preprocessor #if/#else is present Rename the config file name to `ConstPlacement` change the command line option to be `--const-placement` Add Left/R

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 8 inline comments as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/EastWestConstFixer.cpp:139 + return (Tok->isSimpleTypeSpecifier() || + Tok->isOneOf(tok::kw_volatile, tok::kw_auto)); +} aaron.ballman wr

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266360. MyDeveloperDay added a comment. rebase with master CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69764/new/ https://reviews.llvm.org/D69764 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rst clang/include

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. @rsmith, firstly let me thank you for taking the time to review this, I didn't realize i'd invoke such a reaction that the big guns would start showing up.. fundamentally I agree with you, but let me defend my thesi

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D50078#2055609 , @Typz wrote: > In D50078#2055227 , @srj wrote: > > > > And I also think it should be on by default instead of modifying many > > > .clang-format files. So IMHO if

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266460. MyDeveloperDay added a comment. Fix crash whilst rechecking polly ../polly/lib/Analysis/ScopBuilder.cpp:74:8: warning: code should be clang-format ted [-Wclang-format-violations] static int const MaxDimensionsInAccessRange = 9;

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266647. MyDeveloperDay added a comment. Begin to cover the cases raised as potential code-breaking changes by ignoring potential MACRO usage add support for more complex `const unsigned long long` cases (I believe I can simplify this to a more gener

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @rsmith, Thank you for your comments, I don't agree, but thank you anyway. I will continue to feel there is some value here, My hope is that others will feel the same. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69764/new/ https://reviews.llvm.org/D69

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266799. MyDeveloperDay added a comment. Minor change for the simpler review comments before refactoring some of the more involved ones CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69764/new/ https://reviews.llvm.org/D69764 Files: clang/d

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/EastWestConstFixer.cpp:130 + +static void swapFourTokens(const SourceManager &SourceMgr, + tooling::Replacements &Fixes, ---

[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay added a comment. I'm running through flake8... almost every line is changing ;-) ...let me update before wasting any more of your time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80

[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'm adding a summary table which shows LLVM only 44% of all LLVM cpp/h files are clang-formatted. ;-( F12020299: image.png CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80627/new/ https://reviews.llvm.org/D80627 _

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added a comment. In D69764#2058801 , @curdeius wrote: > One last thought, how about making the config a bit more future-proof and > instead of `ConstPlacement` accept what was discussed some

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266883. MyDeveloperDay added a comment. That's a rotate! Remove the multiple swap functions for a single rotateTokens function (Thanks for the inspiration @curdeius) extract the various combination of 2,3,4,5 qualifier types to a simple begin and en

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > @MyDeveloperDay , @Typz -- could you please take a look at these two issues > and give your feedback? (E) looks pretty bad. I'm not familiar enough with > this patch to judge how easy / hard would it be to mitigate these. I agree 'E' is a regression from r

[PATCH] D50078: clang-format: support aligned nested conditionals formatting

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I wondered if it was the < and [] causing issues return aaagggbbb ? ccceeeddd ? 0 : 2 : fff ? 1 : 2; but it seem its not return aaagggbbb ? ccceeeddd ? 0 : 2 : fff

[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D80627#2060463 , @JakeMerdichAMD wrote: > Great idea on this! I may borrow this idea and make something similar for > some migrations I'm working on. > > Sanity check: is this going to be run automatically when docs are

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added inline comments. Comment at: clang/lib/Format/EastWestConstFixer.cpp:195 +FormatToken *Tok) { + // We only need to think about streams that begin with const. + if (!Tok->is(tok

[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

2020-05-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D80627#2062332 , @curdeius wrote: > @MyDeveloperDay , I know it's a strange request, but could you change (or > remove) the background color for 100% case. > I'm partially color-blind and having red and green background

[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

2020-05-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. Would something like this be easier to read? F12027905: image.png Comment at: clang/docs/tools/generate_formatted_state.py:52 +path = os.path.relpath(r

[PATCH] D80627: [clang-format] Create a python documentation tool to generate a summary of the clang-format status for the whole of the LLVM project

2020-05-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/tools/generate_formatted_state.py:52 +path = os.path.relpath(root, LLVM_DIR) +if "/test/" in path: +continue curdeius wrote: > MyDeveloperDay wrote: > > curdeius wrote: > > >

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @steveire Thanks for the additional test cases, I'm reworking how I handle the Macro case as I realized that I didn't actually even try to change the case @rsmith came up with in the first place. I made a decision previous that I couldn't handle any case without

[PATCH] D80830: [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace

2020-05-29 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, JakeMerdichAMD, curdeius, sammccall. MyDeveloperDay added projects: clang, clang-format. https://bugs.llvm.org/show_bug.cgi?id=46130 from Twitter https://twitter.com/ikautak/status/1265998988232159232 I have seen t

[PATCH] D80830: [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace

2020-05-30 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. We don't really have any performance tests, but the following shows some analysis, all builds are release build: - clang-format-ns is built with this change (compiled with VS2017) - clang-format is without (compiled with VS2017) - c:/Program\ Files/LLVM/bin/clang-

[PATCH] D80830: [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace

2020-05-30 Thread MyDeveloperDay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG50bdd6073113: [clang-format] [PR46130] When editing a file with unbalance {} the namespace… (authored by MyDeveloperDay). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D80933: [clang-format] [PR46157] Wrong spacing of negative literals with use of operator

2020-06-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, JakeMerdichAMD, curdeius, mitchell-stellar. MyDeveloperDay added projects: clang, clang-format. MyDeveloperDay added a reviewer: thopre. MyDeveloperDay edited the summary of this revision. https://bugs.llvm.org/show_b

[PATCH] D80933: [clang-format] [PR46157] Wrong spacing of negative literals with use of operator

2020-06-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D80933#2066648 , @thopre wrote: > That was a speedy patch! I can confirm that my non reduced testcase (git diff > -U0 23ac16cf9bd4cc0bb434efcf6385baf083a2ff7b >

[PATCH] D80940: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name, allow clang-format to handle such cases

2020-06-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, JakeMerdichAMD, mitchell-stellar. MyDeveloperDay added projects: clang, clang-format. https://bugs.llvm.org/show_bug.cgi?id=46159 Linux Kernel code using is try as a variable name (as its 'C' code they can), they int

[PATCH] D80950: [clang-format] [PR44542,38872] String << String always get a forced newline.

2020-06-01 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: krasimir, sammccall, klimek, curdeius, JakeMerdichAMD, Abpostelnicu. MyDeveloperDay added projects: clang, clang-format. Herald added a reviewer: bollu. https://bugs.llvm.org/show_bug.cgi?id=44542 https://bugs.llvm.org/show_bug

[PATCH] D80950: [clang-format] [PR44542,38872] String << String always get a forced newline.

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D80950#2069733 , @curdeius wrote: > The change seems to me technically sound, but I'm not sure of the scope of > its effects. There might be users that rely on this behavior. On the other > hand, adding an option to kee

[PATCH] D80940: [clang-format] [PR46159] Linux kernel 'C' code uses 'try' as a variable name, allow clang-format to handle such cases

2020-06-03 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > Out of curiosity, where does "@try" come from? Objective C++ I think Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80940/new/ https://reviews.llvm.org/D80940 ___ cfe-

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