[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-23 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Relanded in https://github.com/llvm/llvm-project/commit/4e88cb6825eefca3c0eb66b5ae40ab123fcc7073 with a fix and a regression test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121450/new/ https://reviews.llvm.org/D12145

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1826 + if (Style.isJavaScript() && Line->MustBeDeclaration) +// 'case: string' field declaration. +break; HazardyKnusperkeks wrote: > Here's the loop. In the

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-22 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. In D121450#3397861 , @jgorbe wrote: > Hi, > > We've observed that this patch introduces infinite loops in some cases. > Here's a reduced test case: > > export class Foo extends Bar { > get case(): Case { > return ( >

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1826 + if (Style.isJavaScript() && Line->MustBeDeclaration) +// 'case: string' field declaration. +break; Here's the loop. In the switch before tha

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-21 Thread Jorge Gorbe Moya via Phabricator via cfe-commits
jgorbe added a comment. Hi, We've observed that this patch introduces infinite loops in some cases. Here's a reduced test case: export class Foo extends Bar { get case(): Case { return ( (this.Bar$has('case')) ? (this.Bar$get('case')) : (

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-13 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. curdeius marked 2 inline comments as done. Closed by commit rG596fa2d90044: [clang-format] Handle attributes before case label. (authored by curdeius). Changed prior to commit: https://reviews.llvm.org/D121450?vs=414610&i

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-12 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:578 +break; + LLVM_FALLTHROUGH; owenpan wrote: > Can we remove this empty line? Will do. Comment at: clang/lib/Format/UnwrappedLineParser.h:125-

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-11 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:578 +break; + LLVM_FALLTHROUGH; Can we remove this empty line? Comment at: clang/lib/Format/UnwrappedLineParser.h

[PATCH] D121450: [clang-format] Handle attributes before case label.

2022-03-11 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://github.com/llvm/llvm-project/issues/5