[all-commits] [llvm/llvm-project] 814aab: [clang-format] regressed default behavior for oper...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Mon Nov 29 06:27:35 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 814aabae37757d21d96e22608ccb98e91c1f3a06
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2021-11-29 (Mon, 29 Nov 2021)

  Changed paths:
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  [clang-format] regressed default behavior for operator parentheses

{D110833} regressed behavior of spaces before parentheses for operators, this revision reverts that so that operators are handled as they were before.

I think in hindsight it was a mistake to try and consume operator behaviour in with the function behaviour, I think Operators can be considered a special style. Its seems the code is getting confused as to if this is a function declaration or definition.

I think latterly we can consider adding an operator parentheses specific custom option but this should have been explicitly called out as it can impact projects.

Reviewed By: HazardyKnusperkeks, curdeius

Differential Revision: https://reviews.llvm.org/D114696

More information about the All-commits mailing list