[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. It turned out that removal range has to be even shorter than in https://reviews.llvm.org/D37566 Repository: rL LLVM https://reviews.llvm.org/D37846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 115192. PriMee added a comment. Done :) https://reviews.llvm.org/D37845 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp lib/Format/UnwrappedLineParser.cpp

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee created this revision. PriMee added a project: clang-tools-extra. Herald added subscribers: xazax.hun, JDevlieghere. Bug: https://bugs.llvm.org/show_bug.cgi?id=34449 **Problem:** Clang-tidy check misc-unused-parameters comments out parameter name omitting following characters (e.g.

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

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee created this revision. Herald added a subscriber: klimek. Bug: https://bugs.llvm.org/show_bug.cgi?id=34016 - **"extern C part"** **Problem:** Due to the lack of "brace wrapping extern" flag, clang format does parse the block after **extern** keyword moving the opening bracket to the

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-15 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Thank you! https://reviews.llvm.org/D37846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Diff will be updated as soon as possible. Comment at: clang-tidy/misc/UnusedParametersCheck.cpp:141 !Indexer->getOtherRefs(Function).empty() || isOverrideMethod(Function)) { -SourceRange RemovalRange(Param->getLocation(), -

[PATCH] D37846: [clang-tidy] Fixed misc-unused-parameters omitting parameters square brackets

2017-09-15 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 115369. PriMee added a comment. Done :) https://reviews.llvm.org/D37846 Files: clang-tidy/misc/UnusedParametersCheck.cpp test/clang-tidy/misc-unused-parameters.cpp Index: test/clang-tidy/misc-unused-parameters.cpp

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

2017-09-15 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. I would be grateful, thank you! https://reviews.llvm.org/D37845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 115202. PriMee added a comment. Sorry, forgot again... https://reviews.llvm.org/D37845 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp

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

2017-09-14 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 115240. PriMee added a comment. Thank you for noticing! Done. https://reviews.llvm.org/D37845 Files: docs/ClangFormatStyleOptions.rst include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D37566: [clang-tidy] fixed misc-unused-parameters omitting parameters default value

2017-09-07 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee created this revision. Herald added a subscriber: JDevlieghere. Bug: https://bugs.llvm.org/show_bug.cgi?id=34450 **Problem:** Clang-tidy check misc-unused-parameters omits parameter default value what results in its complete removal. Compilation errors might occur after clang-tidy fix.

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

2017-09-08 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Yes, would be great :) Thank you! https://reviews.llvm.org/D37140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-09-11 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. ping https://reviews.llvm.org/D37260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37566: [clang-tidy] fixed misc-unused-parameters omitting parameters default value

2017-09-11 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 114538. PriMee added a comment. Done :) Could you please commit this for me? https://reviews.llvm.org/D37566 Files: clang-tidy/misc/UnusedParametersCheck.cpp test/clang-tidy/misc-unused-parameters.cpp Index: test/clang-tidy/misc-unused-parameters.cpp

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

2017-09-06 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 113979. PriMee added a comment. Diff file again updated. Created against the newest commit. https://reviews.llvm.org/D37140 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

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

2017-09-06 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added inline comments. Comment at: lib/Format/UnwrappedLineFormatter.cpp:286 } +if (TheLine->Last->is(tok::l_brace) && +TheLine->First != TheLine->Last && PriMee wrote: > krasimir wrote: > > No tests fail if this `if` statement gets

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

2017-09-12 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. A new style, e.g. **BraceWrapping.AfterExternC** option is what we are considering right now. It would probably handle the problem. Leaving the line break as is might be indeed a bad idea :) https://reviews.llvm.org/D37260

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

2017-09-12 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Great! I will work on it :) https://reviews.llvm.org/D37260 ___ 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-26 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. I merged them just because of their presence in the same bug report... As to the unit tests, I'll add them as soon as possible. With reference to `extern` part, once again: There is no brace wrapping flag that let us control opening brace's position. In case of other

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

2017-08-25 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee created this revision. Herald added a subscriber: klimek. Bug: https://bugs.llvm.org/show_bug.cgi?id=34016 **Problem:** Clang format does not allow the flag **BraceWrapping.AfterEnum** control the case when our **enum** is preceded by **typedef** keyword (what is common in C language).

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

2017-08-25 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee created this revision. Herald added a subscriber: klimek. **Short overview:** Fixed bug: https://bugs.llvm.org/show_bug.cgi?id=34001 Clang-format bug resulting in a strange behavior of control statements short blocks. Different flags combinations do not guarantee expected result. Turned

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

2017-08-29 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 113035. PriMee added a comment. Unit tests added. If there is indeed a necessity to separate these two cases just inform me :) https://reviews.llvm.org/D37143 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineParser.cpp

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

2017-08-31 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 113379. PriMee added a comment. Diff file updated. Some tests added. Some new bugs fixed as well :) https://reviews.llvm.org/D37140 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

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

2017-08-31 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Sorry for wrong formatting before. Some inline comments added. Comment at: lib/Format/UnwrappedLineFormatter.cpp:286 } +if (TheLine->Last->is(tok::l_brace) && +TheLine->First != TheLine->Last && krasimir wrote: > No

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

2017-08-29 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 113074. PriMee added a comment. Unit tests added. https://reviews.llvm.org/D37140 Files: lib/Format/UnwrappedLineFormatter.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

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

2017-08-29 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee created this revision. Herald added a subscriber: klimek. Bug: https://bugs.llvm.org/show_bug.cgi?id=34016 - **"extern C part"** **Problem:** Due to the lack of "brace wrapping extern" flag, clang format does parse the block after **extern** keyword moving the opening bracket to the

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

2017-08-29 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee updated this revision to Diff 113062. PriMee added a comment. Done. **Extern C** part moved to: https://reviews.llvm.org/D37260 https://reviews.llvm.org/D37143 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index: unittests/Format/FormatTest.cpp

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

2017-08-29 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. Could you change the "Contributed by" section? Wrong account is assigned. Full name would be more satisfying. Thank You in advance :) Repository: rL LLVM https://reviews.llvm.org/D37143 ___ cfe-commits mailing list

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

2017-08-29 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a comment. I am glad to hear that. Would be great if someone could commit it. Thank You :) https://reviews.llvm.org/D37143 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-09-01 Thread Pawel Maciocha via Phabricator via cfe-commits
PriMee added a reviewer: krasimir. PriMee added a subscriber: krasimir. PriMee added a comment. @krasimir Could you please tell me what did you mean in the comment: > I am still not convinced about the extern part: some clients might prefer the > other style. Do you suggest adding a new