bring back the valid tests removed as part of D114696: [clang-format] regressed default behavior for operator parentheses
Details
Diff Detail
Event Timeline
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
14124–14125 | Remove the comment too. | |
14276 | What do you think of enabling this test and to remove the space before the opening parenthesis ? As it is now the expected behaviour to have no space. | |
14351 | As the the condition is to add a space before non empty parentheses, the test is valid. |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
14276 | In https://reviews.llvm.org/D114696, you proposed to add an operator overloading option to SpaceBeforeParensOptions. This example: "T A::operator() () {}" should be configured from AfterFunctionDefinitionName or operator overloading ? |
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
14276 | in this circumstance can you explain why you want to treat differently? I can't tell what you intended here was it by design or as a consequence? verifyFormat("T A::operator()();", SpaceFuncDef); verifyFormat("T A::operator() () {}", SpaceFuncDef); |
Its really this case that caused me issues, the behaviour for the foo {} cases was different from the ::operator cases. My feeling is that one is being detected as a function the other not.
verifyFormat("::operator delete(foo);"); verifyFormat("::operator new(n * sizeof(foo));"); verifyFormat("foo() { ::operator delete(foo); }"); verifyFormat("foo() { ::operator new(n * sizeof(foo)); }");
clang/unittests/Format/FormatTest.cpp | ||
---|---|---|
14276 | During the refactoring I treated operator overloading as a function definition. Is it correct or not ? |
Remove the comment too.