crayroud updated this revision to Diff 384679.
crayroud added a comment.
Fix ordering of SpaceBeforeParensCustom options
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110833/new/
https://reviews.llvm.org/D110833
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/docs/ReleaseNotes.
crayroud marked an inline comment as done.
crayroud added inline comments.
Comment at: clang/unittests/Format/FormatTest.cpp:14275
+ verifyFormat("A::A() : a (1) {}", SomeSpace2);
+ verifyFormat("void f() __attribute__ ((asdf));", SomeSpace2);
+ verifyFormat("*(&a + 1);\n"
---
crayroud updated this revision to Diff 384352.
crayroud marked an inline comment as done.
crayroud added a comment.
Reorder the options
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110833/new/
https://reviews.llvm.org/D110833
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/doc
crayroud updated this revision to Diff 383995.
crayroud added a comment.
Add a release note into clang/docs/ReleaseNotes.rst
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110833/new/
https://reviews.llvm.org/D110833
Files:
clang/docs/ClangFormatStyleOptions.rst
clang/docs/ReleaseNo
crayroud added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3469
return true;
- if (Right.is(TT_OverloadedOperatorLParen))
-return spaceRequiredBeforeParens(Right);
- if (Left.is(tok::comma))
+ if (Left.is(tok::comma) && !Right.is(TT_OverloadedOper
crayroud marked 10 inline comments as done.
crayroud added a comment.
I used the following command to verify my changes on multiple files. Thank you
for the tip.
clang-format -verbose -n -files clang/docs/tools/clang-formatted-files.txt
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D1
crayroud marked 6 inline comments as done.
crayroud added inline comments.
Comment at: clang/docs/ClangFormatStyleOptions.rst:3708
+SpaceBeforeParens: Custom
+SpaceBeforeParensFlags:
+ AfterFunctionDefinitionName: true
MyDeveloperDay wrote:
> I'm not
crayroud updated this revision to Diff 383988.
crayroud retitled this revision from "[clang-format] Refactor SpaceBeforeParens
to add flags" to "[clang-format] Refactor SpaceBeforeParens to add options".
crayroud edited the summary of this revision.
crayroud added a comment.
- SpaceBeforeParensFl
crayroud added inline comments.
Comment at: clang/lib/Format/TokenAnnotator.cpp:3170
+ // to add a space only before the first one
+ bool IsFirstLParen = true;
+ const FormatToken *Tok = Right.Previous;
I will simplify the following using Left.is(T
crayroud added inline comments.
Comment at: clang/include/clang/Format/Format.h:3422
///true: false:
- ///for (auto v : values) {} vs. for(auto v: values) {}
+ ///for (auto v : values) {} vs. for (auto v: value
crayroud updated this revision to Diff 381168.
crayroud added a comment.
This new version adds the possibility to configure space before opening
parentheses independently from one another. Instead of creating a new SBPO_
mode for each combinations.
CHANGES SINCE LAST ACTION
https://reviews.l
crayroud added a comment.
Thank you for your inputs. I will work on the changes and update the patch once
it is ready.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110833/new/
https://reviews.llvm.org/D110833
crayroud added inline comments.
Comment at: clang/docs/ClangFormatStyleOptions.rst:3649
``SBPO_ControlStatementsExceptForEachMacros`` remains an alias for
backward compatibility.
MyDeveloperDay wrote:
> Now I look back here, why where these Macro cons
crayroud created this revision.
crayroud added reviewers: aaron.ballman, rsmith.
crayroud added projects: clang, clang-format.
crayroud requested review of this revision.
For some projects the coding style defined requires to have a space before
opening parentheses for function definitions.
This
14 matches
Mail list logo